Loading

Quipoin Menu

Learn • Practice • Grow

angular / Lazy Loading Modules
mcq
Direction: Choose the correct option

Q1.

What is lazy loading in Angular?
A. Loading feature modules on demand, not at startup
B. Loading modules lazily
C. Deferred rendering
D. Slow loading
Direction: Choose the correct option

Q2.

How do you configure lazy loading in routes?
A. Using `children` property
B. Using `lazyLoad` property
C. Using `loadChildren` property
D. Using `component` property
Direction: Choose the correct option

Q3.

What is the correct `loadChildren` syntax for Angular 8+?
A. `lazy: true`
B. `loadChildren: './admin/admin.module#AdminModule'`
C. `loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule)`
D. `loadChildren: 'admin.module'`
Direction: Choose the correct option

Q4.

What is a feature module?
A. A module for components
B. A core module
C. A module that organizes related functionality for lazy loading
D. A module with features
Direction: Choose the correct option

Q5.

What are the benefits of lazy loading?
A. Complexity
B. Faster initial load, smaller bundle sizes
C. More code
D. Slower navigation
Direction: Choose the correct option

Q6.

What is a preloading strategy in Angular?
A. Preload modules
B. Load before
C. Strategy to load lazy modules in the background after app loads
D. Preload strategy
Direction: Choose the correct option

Q7.

How do you enable preloading?
A. `preload: true`
B. `enablePreload: true`
C. `preloadModules: true`
D. `RouterModule.forRoot(routes, {preloadingStrategy: PreloadAllModules})`
Direction: Choose the correct option

Q8.

What is the difference between `loadChildren` and `children`?
A. `loadChildren` for lazy loading; `children` for eager nested routes
B. They are the same
C. `children` for lazy loading
D. `loadChildren` for child routes
Direction: Choose the correct option

Q9.

Can lazy-loaded modules have their own routing?
A. Yes, they typically have their own routing module
B. Only with `forRoot`
C. No, routing must be in root
D. Only with `forChild`
Direction: Choose the correct option

Q10.

What happens when you navigate to a lazy-loaded route?
A. The app reloads
B. An error occurs
C. Nothing happens
D. The module is fetched and loaded on-demand, then the route is activated