指令設(shè)置報錯、
AngularJS實(shí)戰(zhàn)第二章第三節(jié)雙向數(shù)據(jù)綁定章節(jié) 指令設(shè)置顯示Error: [$injector:unpr] Unknown provider: $scopeProvider <- $scope <- hmsDirective錯誤 不知如何解決?(代碼結(jié)構(gòu)和老師的一樣)
//directives.js
bookStoreDirectives.directive('hms', ['$scope',
? ? function($scope) {
? ? return{
restrict:'AEC',
template:'{{name}}<input type="text" ng-model="name"/>',
scope:true //false true {}
}
? ? }
]);
2017-09-13
注入錯誤,可能是變量名稱寫錯了