Hi Raptis,
Its a matter of wording. I’ll try to explain. You can create a provider.
The normal use of an provider returns a factory, which you can inject into
your code. However, angular allows you to create providers that may have
configuration options. If you need to configure this options, you can
inject the provider itself into the config functions.
as an example angular.module(test,[]).provider('sample', fucntion (){..})
returns actually 2 things.(hmmm, well for the sake of this argument it
does!)
first it returns a factory
<https://docs.angularjs.org/api/auto/service/$provide#factory> named sample,
but also it returns a provider
<https://docs.angularjs.org/api/auto/service/$provide#provider> called
sampleProvider, the last one, you can only use inside the aforementioned
config functions, and you can't use it anywhere else.
Does that clear it up enough for you?
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.