Out of the box Angular does not support deferred script loading. I have 
created a solution to this problem, but have a question about the way in 
which it is done.  

My solution is basically to retain a reference to the providers by 
replacing those on the module (module.controller etc.) with the objects 
that are injected ($controllerProvider.register, etc.).  I have a 
StackOverflow question that will help clarify this solution.
http://stackoverflow.com/questions/22867576/angular-lazy-loading-is-it-okay-to-retain-the-providers

While this approach works and I have not experienced any problems to date, 
I do question whether this is the right thing to do. Is it okay to replace 
the *module.controller* or am I unknowingly breaking Angular in the process?

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to