Angular SPA を作成するために、ホット タオル テンプレートの修正版に取り組んでいます。Breeze を使用して、剣道 UI とウィジェットとチャートのデータ Viz でデータ サービスにアクセスしています。
この SO 投稿Chrome//kendoUI/jQuery: Maximum call stack size exceededに記載されている問題と同様の問題に直面しています。微風サービスの出力をチャートに直接バインドすると、クライアントで「 Uncaught Error: [$ rootScope :infdig] 10 $digest() iterations reached. Aborting!最後の 5 回の反復で発生したウォッチャー: [] '
上記のリンクでも示されているように、Breeze の結果には循環参照があります。これを通常の角度スコープ変数にバインドしても問題はありませんが、これをチャートにバインドしたときにのみエラーが発生します。リンクが示唆するようにクライアントでデータをフィルタリングすると、おそらくパフォーマンスに影響があります。いくつかの置換関数と JSON.prune も試しましたが、グラフに表示する必要があるデータも削除されます:(
これに対する他の修正はありますか?
完全なエラーを以下に貼り付けます。プロパティごとにディープコピーを行っているように見えますが、循環参照があるためオーバーフローエラーになってしまいます
RangeError: Maximum call stack size exceeded
at Object.toString (native)
at isArray (http://localhost:61438/Scripts/angular.js:596:19)
at isArrayLike (http://localhost:61438/Scripts/angular.js:278:27)
at forEach (http://localhost:61438/Scripts/angular.js:324:16)
at copy (http://localhost:61438/Scripts/angular.js:871:7)
at copy (http://localhost:61438/Scripts/angular.js:858:23)
at copy (http://localhost:61438/Scripts/angular.js:875:28)
at copy (http://localhost:61438/Scripts/angular.js:858:23)
at copy (http://localhost:61438/Scripts/angular.js:875:28)
at copy (http://localhost:61438/Scripts/angular.js:858:23) angular.js:9778
(anonymous function) angular.js:9778
(anonymous function) angular.js:7216
Scope.$digest angular.js:12270
(anonymous function) angular.js:12450
completeOutstandingRequest angular.js:4300
(anonymous function)
Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: []
http://errors.angularjs.org/1.2.16/$rootScope/infdig?p0=10&p1=%5B%5D angular.js:78
(anonymous function) angular.js:78
Scope.$digest angular.js:12290
(anonymous function) angular.js:12450
completeOutstandingRequest angular.js:4300
(anonymous function)