/** * angular press enter call a function * * Logic exported from ng-click function as largely foes the same thing */ (function() { angular.module('MyApp') .directive("pressEnter", pressEnter);
pressEnter.$inject = ['$parse'];
functionpressEnter($parse) {
return { restrict: 'A', compile: function ($element, attr) {