I traced the Angular code. The loadModules() function looks like load the current running angular module so that although I created a new $injector object, I still get the service object from the current running Angular app.
Sander Elias於 2015年9月5日星期六 UTC+8下午12時51分56秒寫道: > > Hi Will, > > It looks lite that the injector gets the already instantiated version of > the module. Have a look at the variation I made of your pen > <http://codepen.io/SanderElias/pen/ojgPrp?editors=101>. That one delivers > the 'right' version. The lack of time/curiosity prevented me from looking > over the $injectors source, but if you really want to know, the truth is in > there! > > Regards > Sander > -- 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.
