1

次のエラーが表示されます。

Error: Non-assignable model expression: undefined (directive: leaflet)
    at Error (<anonymous>)
    at h (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:43:213)
    at Object.<anonymous> (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:43:326)
    at Object.e.$digest (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:87:13)
    at Object.e.$apply (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:89:198)
    at https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:16:239
    at Object.d [as invoke] (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:28:96)
    at c (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:16:160)
    at tb (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:16:356)
    at lc (https://ajax.googleapis.com/ajax/libs/angularjs/1.0.8/angular.min.js:16:4) angular.min.js:63
(anonymous function) angular.min.js:63

上記のエラーを実際にデバッグしようとしているという事実とは別に、上記のエラーは元のコードではエラー行を表示せず、角度のあるエラー行を表示するため、コードをデバッグする最良の方法は何かを尋ねたいと思います.min.js ファイル?

4

1 に答える 1

1

Well, if i seen that error the first thing i would do is check for elements that have the leaflet directive and then inspect the expression that is inside it. like this

<div leaflet="whatever you have here is undefined"></div>

Well, that's what angular is telling me anyway.

You can also use the Batarang debugging extension for angular.js

于 2013-10-27T12:57:43.277 に答える