循環参照を含む JavaScript オブジェクト グラフがあります。このオブジェクトを angular で使用すると、firefox から次のエラー メッセージが表示されます (「...」には、その前後に同じ行の 100 以上の重複が含まれています)。
Error: too much recursion equals@http://localhost:8080/ops/bower_components/angular/angular.js:995:1
equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15
equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15
...
equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15
equals@http://localhost:8080/ops/bower_components/angular/angular.js:984:17
equals@http://localhost:8080/ops/bower_components/angular/angular.js:997:15
$RootScopeProvider/this.$get</Scope.prototype.$digest@http://localhost:8080/ops/bower_components/angular/angular.js:12491:1
$RootScopeProvider/this.$get</Scope.prototype.$apply@http://localhost:8080/ops/bower_components/angular/angular.js:12762:13
done@http://localhost:8080/ops/bower_components/angular/angular.js:8357:34
completeRequest@http://localhost:8080/ops/bower_components/angular/angular.js:8571:7
createHttpBackend/</xhr.onreadystatechange@http://localhost:8080/ops/bower_components/angular/angular.js:8514:1
オブジェクトがXレベルの深さに一致する場合、オブジェクトを等しいと見なすようにangularに指示する方法はありますか? それとも、角度は循環参照では機能しませんか?
バックストーリー(知りたい場合)
特定のトラバーサル パスに既に表示されているオブジェクトをシリアル化しない、jackson での解決策を見つけるのに苦労していました。これは私にはかなり簡単なように思えますが、機能が存在しないと思います。この回答でjsogに出くわしたのはそのときです。これにより、オブジェクトグラフ(循環依存関係あり)をjavascriptに転送できました。jsog がこれをしてくれたことをとてもうれしく思いましたが、その後、上記のエラーが発生しました。