What is the difference between Factory, Service and Provider?
Answer / chaitanya
Factory - A factory is a simple function which allows you to add some logic before creating the object. It returns the created object.
Service - A service is a constructor function which creates the object using new keyword. You can add properties and functions to a service object by using this keyword. Unlike factory, it doesn’t return anything.
Provider - A provider is used to create a configurable service object. It returns value by using $get() function.
Is This Answer Correct ? | 0 Yes | 0 No |
Difference between sessionstorage, cookies, and localstorage.
What is the difference between service and factory?
Why does angular need an entrycomponents?
What is aot compilation? Why use in angular 2?
What are Modules in AngularJS?
How event emitters works in angular 2?
What is latest version of angular?
What types of ngmodules?
What is ng-app in angularjs?
What is injector tree?
How do you reference the host of a component?
How do I increase my webpack speed?