Hi guys,
I'm working on a reusable service which needs some configuration so I think
it's best to use a provider.
I'm in a multi-module project and each module could require the service
with it's own configuration. All these modules are dependencies from a
parent module which is bootstrapped in the main HTML page.
I've did some tests with a single module and it works like a charm, but I'm
still worrying about the multi-module setup.
Consider the following
angular.module('bar', []).config($fooProvider) { .... }
angular.module('baz', []).config($fooProvider) { .... }
angular.module('main', ['bar', 'baz']);
angular.bootstrap(document.getElement(..), ['main']);
Will the modules 'bar' and 'baz' get an unique instance of 'foo' or will
angular use a single instance because they're both dependencies of the
'main' module.
If so, how will I be able to do some configuration on the 'foo' service and
still get a unique instance per module?
Thanks in advance..
Chris
--
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.