For a router link to get an "active" CSS class when the link's route is active, you can use the ________ directive.
- [activeLink]
- [routerDirective]
- [routerLinkActive]
- [routerStyle]
To ensure that a router link receives an "active" CSS class when its associated route is active, you can use the [routerLinkActive] directive in Angular. This directive allows you to define CSS classes that should be applied when the link's route is active, providing visual feedback to users.
Loading...
Related Quiz
- Which header is crucial for making a CORS request to a different domain using HttpClient?
- When using ChangeDetectionStrategy.OnPush, Angular relies on ________ checks to determine component updates.
- Which class in Angular's Reactive Forms represents a group of FormControl instances?
- The ______ directive provides two-way data binding in template-driven forms, synchronizing the form control's value with a property in the component.
- What is the primary command to create a new Angular application using Angular CLI?