11.) What is the purpose of the pathMatch: ‘full’ property in a route?
A) It redirects the user to an external URL
B) It enables child routes
C) It activates lazy loading
D) It ensures only exact matches are used for navigation
12.) What is a child route in Angular?
A) A route that is lazy-loaded
B) A sub-route inside a parent route
C) A secondary navigation option
D) A duplicate route
13.) How do you define a child route in Angular?
A) Using the children property inside a route
B) Using Router.forChild()
C) Using nestedRoutes: []
D) Using subRoutes: []
14.) Which route guard is used to prevent unauthorized access to routes?
A) CanLoad
B) CanActivate
C) CanDeactivate
D) Resolve
15.) What is the purpose of the CanDeactivate route guard?
A) It prevents unauthorized access
B) It allows lazy loading
C) It asks for confirmation before leaving a route
D) It handles wildcard routes
16.) What is lazy loading in Angular routing?
A) Loading JavaScript files dynamically
B) Loading components only when needed
C) Loading routes based on user permissions
D) Caching API responses
17.) What method is used to listen for route changes?
A) router.events.subscribe()
B) router.change()
C) router.update()
D) router.onRouteChange()
18.) What is the main advantage of lazy loading?
A) Prevents route navigation
B) Increases loading time
C) Reduces the initial bundle size
D) Improves form validation
19.) What is a resolver in Angular routing?
A) A function that delays navigation
B) A service that pre-fetches data before a route is activated
C) A way to prevent unauthorized access
D) A built-in Angular directive
20.) How do you retrieve query parameters in Angular?
A) Using ActivatedRoute.snapshot.queryParams
B) Using Router.navigate()
C) Using getQueryParams()
D) Using ActivatedRoute.params
Related