Skip to content

Commit

Permalink
chore: scroll active link into view in the demo app (#5979)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
crisbeto authored and andrewseguin committed Jul 27, 2017
1 parent 72106c9 commit f28dc06
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/demo-app/demo-app/demo-app.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit f28dc06

Please sign in to comment.