A proof-of-concept Angular 19 application demonstrating a robust, user-friendly tabbed navigation pattern built with Angular Material and CDK Drag & Drop. It showcases a persistent, reorderable tab bar with overflow handling, dynamic tab labels from route data, and a switchable detail view that can open inline or in a new tab. Tailwind CSS v4 is integrated for utility styling alongside Angular Material theming.
🔗 Try it here:
👉 Angular Dynamic Route Tabs — Live Demo
- Tabbed routing UX with reorderable tabs (drag to reorder)
- Overflow handling via menu when tabs exceed the visible area
- Dynamic tabs from route data (e.g., details/:id becomes “Home Details 1”)
- Inline vs new-tab detail view toggled and persisted via localStorage
- Responsive sidenav layout with Angular Material
- Standalone APIs (no NgModules) and lazy routes
- Tailwind CSS v4 + Angular Material theming
- Angular 19, Standalone components
- Angular Material + CDK (Tabs, Sidenav, Menu, DragDrop)
- Tailwind CSS v4
- RxJS, TypeScript
- Prerequisites: Node.js 18+ recommended
- Install:
npm install - Run dev server:
npm startthen open http://localhost:4200 - Build for production:
npm run build(outputs todist/tab-poc) - Unit tests:
npm test
Scripts in package.json:
start→ng servebuild→ng buildwatch→ng build --watch --configuration developmenttest→ng test
- App bootstrap:
src/main.ts,src/app/app.config.ts - Routing (root):
src/app/app.routes.ts - Layout (tabs + sidenav):
src/layout/admin-layout.ts,.html,.scss - Menu config:
src/shared/constants/route-menu.constant.ts,src/shared/models/menu-item.model.ts - Detail view logic:
src/shared/services/detail-view.service.ts - Home lazy module routes:
src/routes/home/home.routes.ts - Global styles/theme:
src/styles.scss - Angular builder/options:
angular.json
- Root routes define a shell layout (
AdminLayout) that hosts the sidenav + tabs and arouter-outletfor content. Homeroutes are lazy-loaded (src/routes/home/home.routes.ts).
- Tab metadata is sourced from
MenuListDatawithisTabable: true. - Tabs persist during navigation, handle overflow, and support drag & drop reordering.
- Uses Angular Material
MatTabGroup+ CDKDragDrop.
- Routes define
data.tabfor dynamic labels, e.g.
data: { tab: { label: 'Home Details', dynamicParam: 'id' }}→/home/details/2→ “Home Details 2”.
DetailViewServicemanages inline vs tab detail mode, persisted via localStorage.- Example implementation:
src/routes/home/list/list.component.ts&.html
- Tailwind CSS v4 integrated via
@use "tailwindcss"insrc/styles.scss - Angular Material theming configured in
angular.json
- Build targets and assets handled in
angular.json - Output:
dist/tab-poc
Add a new top-level tab
- Create the route + component.
- Add a
subMenuentry withisTabable: trueinroute-menu.constant.ts.
Add a dynamic tab
- Set
data: { tab: { label: 'My Details', dynamicParam: 'id' }}in your route. - Example:
/my/route/123→ “My Details 123”.
- Karma + Jasmine via Angular CLI
- Run:
npm test
- Production:
npm run build - Output:
dist/tab-poc
- Video demo stored at
public/screen-capture.webm
- POC only — some components are placeholders (e.g., Users, Inbox).
- Sidenav open state + detail view mode persisted in localStorage.
- No license specified.