Return to site

ANGULAR INTERVIEW QUESTION: What is a service?

· angular,ngInterview

An Angular service is a class that is generally instantiated one time during all the Angular application lifecycle, thanks to the root injector.

 

 

The goal of a service is to organize and to share the business logic between the different Angular application components.

So, an Angular service is a class that can be used in your application thanks to dependency injection that enables code sharing.

 

 

All Posts
×

Almost done…

We just sent you an email. Please click the link in the email to confirm your subscription!

OK