in Angular by
Q:
Can you draw a comparison between the service() and the factory() functions?

1 Answer

0 votes
by

Used for the business layer of the application, the service() function operates as a constructor function. The function is invoked at runtime using the new keyword.

Although the factory() function works in pretty much the same way as the service() function does, the former is more flexible and powerful. In actual, the factory() function are design patterns that help in creating objects.

Click here to read more about Angular JS
Click here to read more about Insurance

Related questions

+1 vote
asked Jan 15, 2020 in Angular by rahuljain1
0 votes
asked Jan 6, 2020 in Angular by sharadyadav1986
0 votes
asked Feb 15, 2020 in Angular by matthenary
0 votes
asked Jun 1, 2020 in Bootstrap by SakshiSharma
0 votes
asked Jun 30, 2020 in Azure by anonymous
...