Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | /** |
||
22 | (function () { |
||
23 | 'use strict'; |
||
24 | |||
25 | /** |
||
26 | * @ngdoc directive |
||
27 | * @name passmanApp.directive:passwordGen |
||
28 | * @description |
||
29 | * # passwordGen |
||
30 | */ |
||
31 | angular.module('passmanExtension') |
||
32 | .directive('ngEnter', function () { |
||
33 | return function (scope, element, attrs) { |
||
34 | element.bind("keydown keypress", function (event) { |
||
35 | if (event.which === 13) { |
||
36 | scope.$apply(function () { |
||
37 | scope.$eval(attrs.ngEnter); |
||
38 | }); |
||
39 | |||
40 | event.preventDefault(); |
||
41 | } |
||
42 | }); |
||
43 | }; |
||
44 | }); |
||
45 | }()); |