+1 vote
in Angular by
What is the difference between a service() and a factory()?

1 Answer

0 votes
by

A service() in Angular is a function that is used for the business layer of the application. It operates as a constructor function and is invoked once at the runtime using the ‘new’ keyword. Whereas factory() is a function which works similar to the service() but is much more powerful and flexible. factory() are design patterns which help in creating Objects.

Related questions

+1 vote
asked Jan 27, 2020 in JAVA by rahuljain1
0 votes
asked Jun 12, 2022 in Azure Data Factory by SakshiSharma
...