Questions
What is the primary purpose of the Angular framework?
- To build dynamic web applications
- To create mobile applications
- To develop desktop applications
- To design user interfaces
Which of the following is the core building block of an Angular application?
- Components
- Modules
- Services
- Directives
What is the role of a module in Angular?
- To group related components, directives, and services
- To define the application's routing
- To provide dependency injection
- To handle HTTP requests
What is the purpose of a service in Angular?
- To provide reusable functionality across components
- To manage state and data
- To handle user input and events
- To perform HTTP requests
What is the primary function of a directive in Angular?
- To modify the behavior of HTML elements
- To create custom HTML elements
- To handle user input and events
- To perform HTTP requests
Which of the following is used for data binding in Angular?
- Interpolation
- Property binding
- Event binding
- Two-way binding
What is the recommended approach for handling state management in Angular?
- Using the NgRx state management library
- Using the Redux state management library
- Using the MobX state management library
- Using the built-in Angular state management features
Which of the following is used for routing in Angular?
- The Angular Router
- The React Router
- The Vue Router
- The Ember Router
What is the purpose of the HttpClient module in Angular?
- To perform HTTP requests
- To handle user input and events
- To manage state and data
- To create custom HTML elements
What is the concept of dependency injection in Angular?
- A technique for providing dependencies to components and services
- A way to create custom HTML elements
- A method for handling user input and events
- A mechanism for performing HTTP requests
Which of the following is used for testing Angular components?
- Jasmine
- Mocha
- Jest
- QUnit
What is the role of the ngAfterViewInit lifecycle hook in Angular?
- It is called after the component's view and child views have been initialized
- It is called after the component's content has been projected
- It is called after the component's inputs have been bound
- It is called after the component's change detection has run
Which of the following is used for change detection in Angular?
- The
ngDoChecklifecycle hook - The
ngOnChangeslifecycle hook - The
ngOnInitlifecycle hook - The
ngAfterViewInitlifecycle hook
What is the purpose of the @Input decorator in Angular?
- To mark a property as an input property
- To mark a property as an output property
- To mark a property as a state property
- To mark a property as a service property
Which of the following is used for event handling in Angular?
- Event listeners
- Event bindings
- Event decorators
- Event directives