Open stephanrauh opened 9 years ago
I think this is the root cause of most of your other problems with JUA. Sorry :-)
I haven't really understood what is happening here for you. Can you please elaborate what error message you are getting or maybe provide a little demo application?
However, your fix is causing other problems together with a fix you made in issue #6 (I think). This fix here is trying to get the injector out of the first ng-controller element, which seems to work at first ... after some time you saw its not anymore (see #6). I would bet, thats because you moved destroying of old scopes to the success phase of ajax requests in your fix for #6.
The problem is, that in the success phase JSF has already updated the DOM and deleted old DOM nodes and updated them with new ones. Destroying of old scopes is pointless now, as the DOM node which angular knew of don't exist anymore. And this is causing angular to not find the injector anymore.
I would very much like to investigate this problem further before accepting a PR.
I observed an error message on this line:
Requesting the injector() specifically from the controller element does the trick for me: