Mid From PDF Angular Angular

In your route: const routes: Routes = [ { path: 'admin', loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule) } ]; ⚡ Only loads AdminModule when user navigates to /admin. routerLinkActive directives?

Short answer: Directive Purpose routerLink Binds a component to a route routerLinkAct ive Applies CSS class when link's route is active ✅ Example: <a routerLink="/home" routerLinkActive="active-link">Home</a> active-link is applied when the current route is /home.

Explain a bit more

Angular? You define route parameters using : in the route path and extract them using ActivatedRoute. ✅ Defining Route: { path: 'product/:id', component: ProductDetailComponent } ✅ Navigating with params: <a [routerLink]="['/product', product.id]">View Details</a> Angular routing? Query params are passed using the URL (e.g., ?sort=price), and managed via the ActivatedRoute service. ✅ Add query params: this.router.navigate(['/products'], { queryParams: { sort: 'price' } }); ✅ Read query params: this.route.queryParams.subscribe(params => { console.log(params['sort']); }); in Angular? ActivatedRoute is a service that gives access to route-related data including: Route parameters Query parameters Route data Parent/child route info ✅ Example: constructor(private route: ActivatedRoute) {} ngOnInit() { this.route.params.subscribe(params => { this.productId = params['id']; }); } Name the…

Example code

}
return true;
}
} { path: 'admin', component: AdminComponent, canActivate: [AuthGuard] } ✅ Summary Table: Feature Purpose RouterModule Enables routing in Angular routerLink Binds HTML element to a route routerLinkAct ive Applies class when route is active ActivatedRout Provides access to route params/query params Lazy Loading Loads feature modules only when needed canActivate Route guard to block unauthorized access Query Params Used for filters, search, sort (/products?sort=price) Nested Routes Embeds child routes within parent route Forms in Angular

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details