Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Angular 8 Interview Questions and Answers

Question: Explain dependency injection in Angular.
Answer: Dependency injection is a design pattern in which a class receives its dependencies from external sources rather than creating them itself. In Angular, the DI system provides and injects the dependencies into the components, services, etc.

Example:

constructor(private dataService: DataService) { }
Is it helpful? Yes No

Most helpful rated by users:

©2024 WithoutBook