What is the primary purpose of Dependency Injection (DI) in Angular?
- Define component behavior
- Enable two-way data binding
- Handle HTTP requests
- Manage external dependencies
The primary purpose of Dependency Injection (DI) in Angular is to manage external dependencies by providing them to a component when it's created.
Loading...
Related Quiz
- You need to implement a feature where clicking on a user's name in a list navigates to a detailed user profile page. The user ID needs to be passed in the URL. How would you implement this using Angular's router?
- What challenges might you encounter when using Angular Universal for Server-Side Rendering?
- What does a service in Angular typically consist of?
- How can you create a custom operator in RxJS?
- To add a third-party library to an Angular project, you can use the _____ command of Angular CLI.