簡化的代碼: var myApp = angular.module("myApp", []);
myApp.factory("mySrvc", function($window) {
var win = angular.element($window);
var foo = {
bar: 0
};
wi
我跟着這個例子Submit form on pressing Enter with AngularJS 但我不能讓它工作。這完全是莫名其妙的。爲什麼按鍵事件不會被我的指令困住? http://plnkr.co/edit/A9oio2F61yHssE49aiCb?p=preview app.directive('enterKey', function($log) {
return func