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 |
How would you optimize the angular 2 application for better performance?
List some methods supported by $http service in angularjs?
What is manual bootstrap process in AngularJS?
Differentiate between angular and angularjs.
Is it a good or bad practice to use angular js together with jquery?
Why traceur compiler in angular 2?
What is forwardref?
How does scope inheritance work in angularjs?
What is dom stand for?
How to access parent scope from child controller in angularjs?
Can we use angularjs in android?
Explain what is testability like in Angular?