Explain the difference between angular service and factory? Explain
Answer»
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.
Also Read: How to negotiate a higher salary after a job offer