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 |
Is mvc front end or backend?
What is the difference between [ngfor] and [ngforof]?
What is angular expression? How do you differentiate between angular expressions and javascript expressions?
What is pipe in networking?
What is $rootscope?
What is a controller angular?
Do you know scope in angular?
What is the difference between javascript and ecmascript?
How to update to angular 5?
What is json web token?
What is scope hierarchy in angularjs?
What is 'no initilization code' in angularjs?