in Angular by
Q:
What is a singleton pattern and where we can find it in Angular?

1 Answer

0 votes
by

Singleton pattern in Angular is a great pattern which restricts a class from being used more than once. Singleton pattern in Angular is majorly implemented on dependency injection and in the services. Thus, if you use ‘new Object()’ without making it a singleton, then two different memory locations will be allocated for the same object. Whereas, if the object is declared as a singleton, in case it already exists in the memory then simply it will be reused.

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

Related questions

+1 vote
asked Jan 16, 2020 in QuickTest Professional (QTP) by JackTerrance
0 votes
asked Oct 30, 2020 in Bootstrap by sharadyadav1986
...