What type of data binding is used when you want to send data from a component's class to its template?
- Event binding
- Interpolation binding
- One-way data binding
- Two-way data binding
In Angular, Two-way data binding is used when you want to send data from a component's class to its template, allowing data to flow in both directions between the component and the template.
When you want to bind a DOM event to a method in your component class, you use event binding.
- event binding
- interpolation binding
- property binding
- two-way binding
In Angular, event binding is used to bind a DOM event to a method in your component class, allowing you to respond to user interactions.
If you need to multicast a single source Observable to multiple observers, you would use a _____.
- forkJoin
- multicast
- subscribe
- toPromise
If you need to multicast a single source Observable to multiple observers, you would use a multicast.
The queryParamsHandling property of the _______ object allows you to specify how Angular should merge query parameters with the current query parameters.
- ActivatedRoute
- ActivatedRouteSnapshot
- Router
- RouterStateSnapshot
The queryParamsHandling property of the Router object allows you to specify how Angular should merge query parameters with the current query parameters.
To test directives with dependencies, Angular provides the _______ class which allows you to inject dependencies and spy on their usage.
- ComponentFixture
- TestBed
- TestBedDependency
- TestBedStub
To test directives with dependencies, Angular provides the TestBed class, which allows you to configure testing modules and inject dependencies.
In NgRx, the _____ property of an action usually contains additional information or context.
- Action
- Meta
- Payload
- Type
In NgRx, the Meta property of an action usually contains additional information or context that can be helpful when processing the action.
In template-driven forms, form controls are automatically created by Angular using the _____.
- FormControlDirective
- FormsModule
- NgModel
- TemplateDirective
In template-driven forms, form controls are automatically created using the NgModel directive.
In Angular, the _____ class is used to create form controls in reactive forms.
- FormBuilder
- FormControl
- FormGroup
- ReactiveFormsModule
In Angular, the FormControl class is used to create form controls in reactive forms.
You are building an e-commerce application and want to ensure that product details are fully loaded before navigating to the product detail page. Which feature of Angular's router would you use to achieve this?
- Angular Lifecycle Hooks
- Route Guards
- Router Interceptors
- Router Resolvers
To ensure that product details are fully loaded before navigating, you can utilize Router Resolvers. A resolver can fetch data asynchronously before activating a route, ensuring that the data is available when the route is displayed.
To enable lazy loading in Angular, you need to use the _____ property in your routing configuration.
- enableLazyLoad
- lazyLoad
- loadChildren
- routeLazy
To enable lazy loading in Angular, you need to use the loadChildren property in your routing configuration to specify the module to load lazily.