What means “Observer reaction functions should not change model” using a nested ng-repeat?

好久不见. 提交于 2019-12-01 18:35:54

Angular only supports pure functions in expressions. I guess this started with 0.9.10 because there already was a similar question recently where it stopped working after the update.

ctrl.listOfB(a)

should always return the same result for the same argument,

or even if the result is the same, the cause could be that ctrl.listOfB(a) always returns a new instance of the same result. Angular 0.9.10 doesn't like this either.

It repeatedly evaluates the expression and if it receives a new result each time it throws.

I think the solution is to cache the results and return from the cache if already available.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!