Skip to content

Commit

Permalink
chore(docs): add current page example for breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
astagi committed Dec 4, 2024
1 parent 62d50bb commit d0948cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h3>Esempio Breadcrumb</h3>
<div class="bd-example">
<it-breadcrumb [dark]="isDark" [separator]="separator">
<it-breadcrumb-item *ngFor="let item of items" class="me-1" [href]="item.link" [iconName]="item.icon">
<it-breadcrumb-item *ngFor="let item of items" class="me-1" [href]="item.link" [iconName]="item.icon" [active]="item.active">
{{ item.label }}
</it-breadcrumb-item>
</it-breadcrumb>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,18 @@ export class BreadcrumbExampleComponent {
separator = '/';
isDark = false;
items = [
{ link: 'https://www.aol.com', label: 'Crumb 1', icon: this.icon },
{ link: 'https://www.yahoo.com', label: 'Crumb 2', icon: this.icon },
{ link: 'https://www.bing.com', label: 'Crumb 3', icon: this.icon },
{ link: 'https://www.aol.com', label: 'Crumb 1', icon: this.icon, active: false },
{ link: 'https://www.yahoo.com', label: 'Crumb 2', icon: this.icon, active: false },
{ link: 'https://www.bing.com', label: 'Crumb 3', icon: this.icon, active: true },
];

i = 4;

insert() {
this.items.push({ link: `https://www.google.com`, label: `Crumb ${this.i}`, icon: this.icon });
for (const item of this.items) {
item.active = false;
}
this.items.push({ link: `https://www.google.com`, label: `Crumb ${this.i}`, icon: this.icon, active: true });
this.i++;
}

Expand Down

0 comments on commit d0948cc

Please sign in to comment.