내 샘플, 아주 기본적인 스켈레톤 앱이 정상적으로 작동합니다. 그런 다음 this question - Plunk here에서 @MaximShoustin 대답을 추가하려고했습니다.AngularJs injection error
그리고 무엇 관련 코드가 $sce
와 $sanitize
(나는 컨트롤러와 모듈의 마지막 항목에 마지막 두 개의 매개 변수 추가) 주입되어야한다 여기에
jquery-3.1.1.min.js:2 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.0/$injector/modulerr?p0=inspinia&p1=Error%3A%20%5B%24injector%3Amodulerr%5D%20http%3A%2F%2Ferrors.angularjs.org%2F1.5.0%2F%24injector%2Fmodulerr%3Fp0%3Doc.lazyLoad%26p1%3DError%253A%2520%255B%2524injector%253Anomod%255D%2520http%253A%252F%252Ferrors.angularjs.org%252F1.5.0%252F%2524injector%252Fnomod%253Fp0%253DngSanitize%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A6%253A416%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A25%253A136%250A%2520%2520%2520%2520at%2520b%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A24%253A188)%250A%2520%2520%2520%2520at%2520Object.module%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A24%253A431)%250A%2520%2520%2520%2520at%2520u%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fplugins%252Foclazyload%252Fdist%252FocLazyLoad.min.js%253A8%253A2925)%250A%2520%2520%2520%2520at%2520Object.n%2520%255Bas%2520forEach%255D%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A7%253A355)%250A%2520%2520%2520%2520at%2520u%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fplugins%252Foclazyload%252Fdist%252FocLazyLoad.min.js%253A8%253A2994)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fplugins%252Foclazyload%252Fdist%252FocLazyLoad.min.js%253A8%253A3048%250A%2520%2520%2520%2520at%2520Object.n%2520%255Bas%2520forEach%255D%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A7%253A355)%250A%2520%2520%2520%2520at%2520u%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fplugins%252Foclazyload%252Fdist%252FocLazyLoad.min.js%253A8%253A3026)%250A%2520%2520%2520%2520at%2520new%2520%253Canonymous%253E%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fplugins%252Foclazyload%252Fdist%252FocLazyLoad.min.js%253A8%253A3511)%250A%2520%2520%2520%2520at%2520Object.instantiate%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A41%253A396)%250A%2520%2520%2520%2520at%2520c%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A38%253A348)%250A%2520%2520%2520%2520at%2520Object.provider%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A38%253A290)%250A%2520%2520%2520%2520at%2520d%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A39%253A234)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A39%253A340%250A%2520%2520%2520%2520at%2520n%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A7%253A355)%250A%2520%2520%2520%2520at%2520g%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A39%253A135)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A39%253A304%250A%2520%2520%2520%2520at%2520n%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A7%253A355)%250A%2520%2520%2520%2520at%2520g%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A39%253A135)%250A%2520%2520%2520%2520at%2520fb%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A43%253A164)%250A%2520%2520%2520%2520at%2520c%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A20%253A449)%250A%2520%2520%2520%2520at%2520Ac%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A21%253A259)%250A%2520%2520%2520%2520at%2520fe%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A20%253A69)%250A%2520%2520%2520%2520at%2520HTMLDocument.%253Canonymous%253E%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fangular%252Fangular.min.js%253A306%253A372)%250A%2520%2520%2520%2520at%2520j%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fjquery%252Fjquery-3.1.1.min.js%253A2%253A29948)%250A%2520%2520%2520%2520at%2520k%2520(http%253A%252F%252Flocalhost%252Fa%252Fjs%252Fjquery%252Fjquery-3.1.1.min.js%253A2%253A30262)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A6%3A416%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A40%3A60%0A%20%20%20%20at%20n%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A7%3A355)%0A%20%20%20%20at%20g%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A39%3A135)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A39%3A304%0A%20%20%20%20at%20n%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A7%3A355)%0A%20%20%20%20at%20g%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A39%3A135)%0A%20%20%20%20at%20fb%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A43%3A164)%0A%20%20%20%20at%20c%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A20%3A449)%0A%20%20%20%20at%20Ac%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A21%3A259)%0A%20%20%20%20at%20fe%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A20%3A69)%0A%20%20%20%20at%20HTMLDocument.%3Canonymous%3E%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fangular%2Fangular.min.js%3A306%3A372)%0A%20%20%20%20at%20j%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fjquery%2Fjquery-3.1.1.min.js%3A2%3A29948)%0A%20%20%20%20at%20k%20(http%3A%2F%2Flocalhost%2Fa%2Fjs%2Fjquery%2Fjquery-3.1.1.min.js%3A2%3A30262)
at angular.js:38
at angular.js:4526
at n (angular.js:321)
at g (angular.js:4487)
at fb (angular.js:4409)
at c (angular.js:1691)
at Ac (angular.js:1712)
at fe (angular.js:1606)
at HTMLDocument.<anonymous> (angular.js:30423)
at j (jquery-3.1.1.min.js:2)
at k (jquery-3.1.1.min.js:2)
이야 얻을 - 내가 뭘를 잘못?
function MainCtrl($rootScope, $scope, $http, $interval, $state, $location, $sanitize, $sce)
그 이후
(function() {
angular.module('inspinia', [
'ui.router', // Routing
'oc.lazyLoad', // ocLazyLoad
'ui.bootstrap', // Ui Bootstrap
'ui.grid', // Grid
'ngSanitize'
])
})();
가 유일한 변화는 볼
[업데이트]로
<iframe ng-src="{{cvTrustedUrl}}"></iframe>
를 추가하는 것 I은 ngSantize 주입하지만, 지금 나는
를 얻는다.각-sanitize.js : 19 catch되지 않은 형식 오류 : 각-sanitize.js에서 정의되지 않은 의 특성 '$$ minErr'을 읽을 수 없습니다 : 각-sanitize.js 19 : 6 (익명) 각-살균 @. JS : 19 (익명) @ 각-sanitize.js :
Failed to instantiate module oc.lazyLoad due to:
Error: [$injector:nomod] http://errors.angularjs.org/1.5.0/ $injector/nomod?p0=ngSa...
과 : 6
HTML에 'angular-sanitize.js'를 포함 시켰습니까? –
''sanitize'와'sce' ...를 주입하기 전에 오류가 없습니다 ...? 내가 그들을 제거하면, dev 콘솔에 오류가 없습니다. – Mawg
'$ sanitize'는'angular-sanitize.js'를 추가 한 후에 만 작동합니다. 당신이 그것을 추가 했습니까? –