mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore: scroll active link into view in the demo app (#5979)
Scrolls to the active link in the demo app when the sidenav is opened. Previously it would jump back up to the first one. This isn't a huge issue, but is something that has been bugging me for a while.
This commit is contained in:
committed by
Andrew Seguin
parent
72106c9801
commit
f28dc064c2
@@ -4,6 +4,9 @@
|
||||
<a *ngFor="let navItem of navItems"
|
||||
md-list-item
|
||||
(click)="start.close()"
|
||||
routerLinkActive
|
||||
#routerLinkActiveInstance="routerLinkActive"
|
||||
[attr.tabindex]="routerLinkActiveInstance.isActive ? 0 : -1"
|
||||
[routerLink]="[navItem.route]">
|
||||
{{navItem.name}}
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user