This repository was archived by the owner on Jun 8, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
docs(navigation-drawer): remove nav tag since it is added from the component itself #5989
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -51,15 +51,13 @@ While any content can be provided in the template, the [`igxDrawerItem`]({enviro | |
| <div class="content-wrap"> | ||
| <igx-nav-drawer id="navigation" #drawer [isOpen]="true"> | ||
| <ng-template igxDrawer> | ||
| <nav> | ||
| <span igxDrawerItem [isHeader]="true"> Email Account </span> | ||
| <span igxDrawerItem igxRipple> Inbox </span> | ||
| <span igxDrawerItem igxRipple [active]="true"> Drafts </span> | ||
| <span igxDrawerItem igxRipple> Sent </span> | ||
| <span igxDrawerItem [isHeader]="true"> Folders </span> | ||
| <span igxDrawerItem igxRipple> Deleted </span> | ||
| <span igxDrawerItem igxRipple> Archive </span> | ||
| </nav> | ||
| </ng-template> | ||
| </igx-nav-drawer> | ||
| <main> | ||
|
|
@@ -237,27 +235,23 @@ One way to tie in the active state is to directly use the [`routerLinkActive`](h | |
| ```html | ||
| <!-- ... --> | ||
| <ng-template igxDrawer> | ||
| <nav> | ||
| <span *ngFor="let item of componentLinks" routerLink="{{item.link}}" | ||
| igxDrawerItem igxRipple | ||
| routerLinkActive="igx-nav-drawer__item--active" > | ||
| {{item.name}} | ||
| </span> | ||
| </nav> | ||
| <span *ngFor="let item of componentLinks" routerLink="{{item.link}}" | ||
| igxDrawerItem igxRipple | ||
| routerLinkActive="igx-nav-drawer__item--active" > | ||
| {{item.name}} | ||
| </span> | ||
| </ng-template> | ||
| <!-- ... --> | ||
| ``` | ||
| This approach, of course, does not affect the actual directive active state and could be affected by styling changes. An alternative would be the more advanced use of `routerLinkActive` where it's assigned to a template variable and the `isActive` can be used for binding: | ||
| ```html | ||
| <!-- ... --> | ||
| <ng-template igxDrawer> | ||
| <nav> | ||
| <span *ngFor="let item of componentLinks" routerLink="{{item.link}}" | ||
| routerLinkActive #rla="routerLinkActive" | ||
| igxDrawerItem igxRipple [active]="rla.isActive"> | ||
| {{item.name}} | ||
| </span> | ||
| </nav> | ||
| <span *ngFor="let item of componentLinks" routerLink="{{item.link}}" | ||
| routerLinkActive #rla="routerLinkActive" | ||
| igxDrawerItem igxRipple [active]="rla.isActive"> | ||
| {{item.name}} | ||
| </span> | ||
|
Comment on lines
+250
to
+254
|
||
| </ng-template> | ||
| <!-- ... --> | ||
| ``` | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Angular templates, prefer property binding for
routerLinkinstead of string interpolation in an attribute. Using[routerLink]="item.link"(or an array form) avoids unnecessary string interpolation and keeps the directive input typed as intended.