Which directive is used to link to routes in Angular?
- ngRoute
- routerLink
- routeLink
- ngLink
In Angular, the directive used to link to routes is routerLink. This directive is used in templates to generate hyperlinks that navigate to different views or components in an Angular application when clicked. The other options are not valid Angular directives for routing purposes.
Loading...
Related Quiz
- When the ViewEncapsulation.Emulated mode is used, Angular adds unique ________ to styles to achieve scoped styling.
- In the Angular route configuration, the children property is used to define ________.
- The mechanism that allows you to inject content from a parent component into a child component's view is known as ________.
- In Angular's reactive forms, the method used to mark a control as touched is called ______.
- Which command or flag should you use with Angular CLI if you want to analyze the size of your bundles?