file for directives

This commit is contained in:
Davide Alberani 2015-04-18 15:26:04 +02:00
parent 82c1b58303
commit d986d9467f
2 changed files with 1 additions and 15 deletions

View file

@ -16,6 +16,7 @@
<script src="/js/app.js"></script>
<script src="/js/i18n.js"></script>
<script src="/js/filters.js"></script>
<script src="/js/directives.js"></script>
<script src="/js/services.js"></script>
<script src="/js/controllers.js"></script>
<link href="/static/css/normalize.css" rel="stylesheet">

15
angular_app/js/app.js vendored
View file

@ -35,21 +35,6 @@ eventManApp.run(['$rootScope', '$state', '$stateParams',
);
/* Directive that can be used to make an input field react to the press of Enter. */
eventManApp.directive('ngEnter', function () {
return function (scope, element, attrs) {
element.bind("keydown keypress", function (event) {
if(event.which === 13) {
scope.$apply(function (){
scope.$eval(attrs.ngEnter);
});
event.preventDefault();
}
});
};
});
/* Configure the states. */
eventManApp.config(['$stateProvider', '$urlRouterProvider',
function($stateProvider, $urlRouterProvider) {