Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between Factory, Service and Provider?



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

Post New Answer

More AngularJS Interview Questions

Why we use routing in angularjs?

0 Answers  


What is forgiving in angularjs?

0 Answers  


Does bootstrap require jquery?

0 Answers  


When will nginit be called? How would you make use of ngoninit()?

0 Answers  


Who made redux?

0 Answers  


How is shadow dom helping angular 2 to perform better?

0 Answers  


What is angular @ routeparams?

0 Answers  


What is local reference in angular?

0 Answers  


What is single page application (spa)?

0 Answers  


What is the bootstrapping in AngularJS?

0 Answers  


What is dependency injection in angular?

0 Answers  


What is the difference between `{'ngfor'}` and `{`ngforof`}` in angular 2?

0 Answers  


Categories