All quizzesEasy
Route Config & Links
Preview — 3 of 10 questions
How do you define application routes in an Angular standalone application?
AUse provideRouter(routes) in bootstrapApplication providers and define a Routes array
BExport routes from AppModule.declarations
CAdd routes to the @Component decorator's routes property
DImport RouterModule.forRoot(routes) in the root standalone component's imports
What is the purpose of <router-outlet> in a template?
AIt defines a navigation menu
BIt marks the location where the router renders the matched component
CIt creates a link to another route
DIt guards access to a protected area of the template
What is the difference between <a href="/about"> and <a routerLink="/about">?
AThere is no difference — both navigate to the same URL
BrouterLink only works for relative paths; href works for absolute paths
Chref triggers a full page reload; routerLink navigates using Angular's client-side router without a page reload
DrouterLink requires authentication; href does not
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.