| 123456789101112131415 |
- (function() {
- try {return angular.module('ieat.ui')}
- catch {return angular.module('ieat.ui', [])}}
- )().directive('myOnEnter', function () {
- return function (scope, element, attrs) {
- element.bind("keydown keypress", function (event) {
- if(event.which === 13) {
- scope.$apply(function (){
- scope.$eval(attrs.myOnEnter);
- });
- event.preventDefault();
- }
- });
- };
- });
|