-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(breadcrumb): make nxBreadcrumbItem more lenient and add example w…
…ith context menu and buttons (#1376)
- Loading branch information
1 parent
0bc5fd1
commit e4a24ad
Showing
7 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
Empty file.
29 changes: 29 additions & 0 deletions
29
...entation/examples/breadcrumb/breadcrumb-context-menu/breadcrumb-context-menu-example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<nav aria-label="Breadcrumb"> | ||
<ol nxBreadcrumb> | ||
<li> | ||
<button | ||
nxBreadcrumbItem | ||
[nxContextMenuTriggerFor]="menu" | ||
aria-label="Show hidden breadcrumbs" | ||
> | ||
... | ||
</button> | ||
</li> | ||
<li> | ||
<a nxBreadcrumbItem [routerLink]="'#'"> Subpage 3 </a> | ||
</li> | ||
<li> | ||
<a nxBreadcrumbItem [routerLink]="null"> Current </a> | ||
</li> | ||
</ol> | ||
</nav> | ||
|
||
<nx-context-menu #menu="nxContextMenu"> | ||
<button nxContextMenuItem type="button">Home</button> | ||
<button nxContextMenuItem type="button" class="nx-margin-left-s"> | ||
Subpage 1 | ||
</button> | ||
<button nxContextMenuItem type="button" class="nx-margin-left-2m"> | ||
Subpage 2 | ||
</button> | ||
</nx-context-menu> |
30 changes: 30 additions & 0 deletions
30
...umentation/examples/breadcrumb/breadcrumb-context-menu/breadcrumb-context-menu-example.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Component } from '@angular/core'; | ||
import { RouterLink } from '@angular/router'; | ||
import { | ||
NxBreadcrumbComponent, | ||
NxBreadcrumbItemComponent, | ||
} from '@aposin/ng-aquila/breadcrumb'; | ||
import { | ||
NxContextMenuComponent, | ||
NxContextMenuItemComponent, | ||
NxContextMenuTriggerDirective, | ||
} from '@aposin/ng-aquila/context-menu'; | ||
|
||
/** | ||
* @title Context menu example | ||
*/ | ||
@Component({ | ||
selector: 'breadcrumb-context-menu-example', | ||
templateUrl: './breadcrumb-context-menu-example.html', | ||
styleUrls: ['./breadcrumb-context-menu-example.css'], | ||
standalone: true, | ||
imports: [ | ||
NxBreadcrumbComponent, | ||
NxBreadcrumbItemComponent, | ||
RouterLink, | ||
NxContextMenuComponent, | ||
NxContextMenuTriggerDirective, | ||
NxContextMenuItemComponent, | ||
], | ||
}) | ||
export class BreadcrumbContextMenuExampleComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters