Video – Angular Interview : is Angular Service Singleton ?

One of the most popular Angular interview questions is, whether a service is singleton?

By default, when you create a service using the below CLI command,

ng g s app

AppService is singleton, however it can be re-provided to create more objects of it. Say, you again re provide AppService in one of the components, then Angular creates one more object of the AppService.

To learn more watch the video.

Leave a comment

Create a website or blog at WordPress.com