Here\'s a simplified version of the code where I get an error that is logged even if the generated HTML looks good. What does this exception means ? Why do I get it ?
<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.