file for directives
This commit is contained in:
parent
82c1b58303
commit
d986d9467f
2 changed files with 1 additions and 15 deletions
|
@ -16,6 +16,7 @@
|
||||||
<script src="/js/app.js"></script>
|
<script src="/js/app.js"></script>
|
||||||
<script src="/js/i18n.js"></script>
|
<script src="/js/i18n.js"></script>
|
||||||
<script src="/js/filters.js"></script>
|
<script src="/js/filters.js"></script>
|
||||||
|
<script src="/js/directives.js"></script>
|
||||||
<script src="/js/services.js"></script>
|
<script src="/js/services.js"></script>
|
||||||
<script src="/js/controllers.js"></script>
|
<script src="/js/controllers.js"></script>
|
||||||
<link href="/static/css/normalize.css" rel="stylesheet">
|
<link href="/static/css/normalize.css" rel="stylesheet">
|
||||||
|
|
15
angular_app/js/app.js
vendored
15
angular_app/js/app.js
vendored
|
@ -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. */
|
/* Configure the states. */
|
||||||
eventManApp.config(['$stateProvider', '$urlRouterProvider',
|
eventManApp.config(['$stateProvider', '$urlRouterProvider',
|
||||||
function($stateProvider, $urlRouterProvider) {
|
function($stateProvider, $urlRouterProvider) {
|
||||||
|
|
Loading…
Reference in a new issue