-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Loading scripts dynamically and resolving view using promisses does break changing route #2894
Comments
using 1.1.5, the same on 1.1.4 |
But the view (pricings) is switched to when I click on the button on the view from that it is switching...looks like $apply call is missing. |
@honzajde this seems to be a general question about AngularJS usage and as such would be better asked using one of those channels:
We want to keep GitHub issues for bug reports and feature requests so closing this one for now. Please re-open with a clear reproduce scenario if you still believe that there is a bug in AngularJS. |
@pkozlowski-opensource Can u at least give me a hint of what is going on? Of course I searched elsewhere, haven't found anything close to my issue. I've been using angular almost half year. Thanks. |
@pkozlowski-opensource I created plunks to demonstrate the issue.
The problem is that the view does not get changed. This happens only when at least two controller dependencies are resolved as promisses via script loading. This one demostrates the issue: http://plnkr.co/edit/wthRp0WQ80lFdRrHyzPQ |
After some week I found out, that this issue is maybe related to #2942, hwoever I am encountering it on Chrome. As mentioned under the issue 2942, wrapping resolve() into $rootScope.$apply() appears to solve the problem:
|
View 'switch' does not happen. On mouse click it happens, although template displays twice (one is not compiled).
Is this because $q or loading templates collides with custom script loading? How to avoid this problem? I can not do regulat JSONP with variable callback name, since the point of what I am doing is to load a static resource.
Thanks anyone for helping.
The text was updated successfully, but these errors were encountered: