
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
ng14-dynamic-breadcrumb
Advanced tools
Angular 14 Dynamic Breadcrumbs. Fork of https://www.npmjs.com/package/ng7-dynamic-breadcrumb. Fixes issue with devDependencies only going up to 12. Allowing stand NPM install success.
ng7-dynamic-breadcrumb is a module for Angular that generates a breadcrumb for any page of your application. It is based on the built-in Angular router.
1.Install ng7-dynamic-breadcrumb via npm:
npm install --save ng7-dynamic-breadcrumb
Choose the version corresponding to your Angular version:
| Angular | ng7-dynamic-breadcrumb |
|---|---|
| 12 | 6.x+ |
| 11 | 5.x+ |
| 10 | 4.x+ |
| 9 | 3.x |
| 8 | 2.x+ |
| 7 | 1.x |
2.Import the Ng7DynamicBreadcrumbModule within your app:
import {Ng7DynamicBreadcrumbModule} from "ng7-dynamic-breadcrumb";
@NgModule({
imports: [
Ng7DynamicBreadcrumbModule,
],
})
3.Add a name to your route by adding a breadcrumb property in the route's data:
const routes: Routes = [
{
path: 'page1/:pageOneID',
component: PageComponent,
data: {
title: 'page1',
breadcrumb: [
{
label: 'Page1',
url: ''
}
]
},
},
{
path: 'page1/:pageOneID/page2/:pageTwoID',
component: Page2Component,
data: {
title: 'page2',
breadcrumb: [
{
label: 'page {{pageOneID}}',// pageOneID Parameter value will be add
url: '/page1/:pageOneID'
},
{
label: 'page {{pageTwoID}}',// pageTwoID Parameter value will be add
url: ''
}
]
},
},
{
path: 'page1/:pageOneID/page2/:pageTwoID/page3/:pageThreeID',
component: Page3Component,
data: {
title: 'page3',
breadcrumb: [
{
label: 'page1',
url: '/page1/:pageOneID'
},
{
label: '{{dynamicText}} page', // If "dynamicText" is not parameter , should be set value using Ng7MatBreadcrumbService, More info please check the 5th point.
url: 'page1/:pageOneID/page2/:pageTwoID'
},
{
label: '{{customText}}', // If "customText" is not parameter , should be set value using Ng7MatBreadcrumbService, More info please check the 5th point.
url: ''
}
]
},
},
];
4.Put the Ng7DynamicBreadcrumbComponent's selector within your template:
<app-ng7-dynamic-breadcrumb></app-ng7-dynamic-breadcrumb>
<router-outlet></router-outlet>
<!-- breadcrumbConfig: object = {
bgColor: '#eee',
fontSize: '18px',
fontColor: '#0275d8',
lastLinkColor: '#000',
symbol: ' / ',
}; -->
<!-- <app-ng7-dynamic-breadcrumb [bgColor]="'#eee'" [fontSize]="'18px'" [fontColor]="'#0275d8'" [lastLinkColor]="'#000'" [symbol]="' << '"></app-ng7-dynamic-breadcrumb> -->
<!-- <app-ng7-dynamic-breadcrumb [bgColor]="breadcrumbConfig['bgColor']" [fontSize]="breadcrumbConfig['fontSize']" [fontColor]="breadcrumbConfig['fontColor']" [lastLinkColor]="breadcrumbConfig['lastLinkColor']" [symbol]="breadcrumbConfig['symbol']"></app-ng7-dynamic-breadcrumb> -->
| Input | Required | Details |
|---|---|---|
| bgColor | Optional | To set background-color for Breadcrumb, default #eee |
| fontSize | Optional | To set size of Breadcrumb, default 18px |
| fontColor | Optional | To set color of Breadcrumb, default #0275d8 |
| lastLinkColor | Optional | To set color of last link Breadcrumb, default #000 |
| symbol | Optional | To set symbol of Breadcrumb, default / |
5.Set the value using Ng7DynamicBreadcrumbService
import { Ng7DynamicBreadcrumbService } from 'ng7-dynamic-breadcrumb';
constructor(private ng7DynamicBreadcrumbService: Ng7DynamicBreadcrumbService) { }
ngOnInit() {
const breadcrumb = {customText: 'This is Custom Text', dynamicText: 'Level 2 '};
this.ng7DynamicBreadcrumbService.updateBreadcrumbLabels(breadcrumb);
}
Report bugs/problems by creating an issue creating an issue
Pick one of the issues from the issue list to get started.
Developer: Raja Rama Mohan Thavalam
| Raja Rama Mohan Thavalam |
|---|
(The MIT License)
Copyright (c) 2021 Thavalam Raja Rama Mohan
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.