Difference between services and factory.
Answer / Kamta Yadav
Both services and factories are used for dependency injection in AngularJS, but they differ in how instances are created. Factory creates a new instance every time it is invoked, while service reuses the same instance during its lifetime.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is hidden property in angular 2?
What is a function decorator?
Explain how does angularjs implement two-way binding?
What is ng-init in angularjs?
What is angular 5? What’s new in angular 5?
How angular router works?
How to redirect to 404 or other path if the path does not exist in angular 2?
What are the core differences between observables and promises?
What is post linking function in angularjs?
Can we set an angular variable from php session variable without sending an http request?
Explain the difference between constructor and ngoninit in angular 6?
What are the new features of angular 2?