while the difference between factories and services is cosmetic at best, providers will allow you to configure a service before it gets used by angular. That's why angular's router is a provider , because you need to configure it in the configure method. It's not really question of "business case". Do you need custom configuration prior to starting a service (like setting up routes in a router ) then use a provider , otherwise use a service.
Le mardi 22 septembre 2015 16:22:46 UTC+2, Ankit Tanna a écrit : > > Hi All, > > I have been working with angular js for quite some time now and have been > using factory, services and providers. > > All the 3 do the same stuff. i.e. share the common functionality. But is > there any strong business case which can justify where are these things > used or should be used? > > Thanks, > Ankit > -- 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.
