Loading…

Explain the difference between angular service and factory? Explain

S.no Angular service Factory
1. Angular service is a function dedicated to the business layer of the application. It worked as a constructor function and invoked at runtime with new. Public methods can be added to it. The factory is a design pattern to create objects, return functions and closures, return Object literals, return a simply String and more.

Suggest An Answer

No suggestions avaliable!

Latest post from Angular 6 Interview Questions

Ask Question