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 |
Explain ng-bind and ng-bind-html directives.
What components can be defined within AngularJS modules?
What is pipe in angular?
How to send an http post request in angularjs?
What is filter in angularjs?
What is ngmodule in angular?
Why do we use ts instead of js?
Is angular or react easier to learn?
What is eventemitter angular2?
What is traceur compiler? Why in angular 2?
How do I increase my webpack speed?
Is it possible to have a multiple router-outlet in the same template?