Loading

Quipoin Menu

Learn • Practice • Grow

angular / Routing in Angular
mcq
Direction: Choose the correct option

Q1.

What is routing in Angular?
A. A mechanism for navigating between views or pages
B. A way to handle HTTP requests
C. A styling technique
D. A method for data binding
Direction: Choose the correct option

Q2.

Which module is required for routing?
A. FormsModule
B. RouterModule
C. HttpClientModule
D. CommonModule
Direction: Choose the correct option

Q3.

What is the purpose of `Routes` type?
A. To define an array of route configurations
B. To guard routes
C. To navigate
D. To create a route
Direction: Choose the correct option

Q4.

What is a route parameter?
A. A header
B. A variable part of the URL, like `:id`
C. A fragment
D. A query parameter
Direction: Choose the correct option

Q5.

What does `RouterModule.forRoot(routes)` do?
A. Configures the router at the root level
B. Configures routing for feature modules
C. Creates a new router
D. Imports routes
Direction: Choose the correct option

Q6.

What is the difference between `forRoot` and `forChild`?
A. They are the same
B. `forRoot` for root module, `forChild` for feature modules
C. `forRoot` for child
D. `forChild` for root
Direction: Choose the correct option

Q7.

What is the `Router` service used for?
A. To guard routes
B. To resolve data
C. To navigate programmatically and access router state
D. To create routes
Direction: Choose the correct option

Q8.

What is the `ActivatedRoute` service?
A. Creates routes
B. Provides access to information about the current route
C. Guards routes
D. Activates routes
Direction: Choose the correct option

Q9.

What is a route outlet?
A. A route container
B. A navigation element
C. A router component
D. A placeholder where a routed component is rendered
Direction: Choose the correct option

Q10.

What is the default route matching strategy?
A. full
B. prefix
C. partial
D. exact