Skip to content

Commit

Permalink
Fix active route
Browse files Browse the repository at this point in the history
While upgrading to the latest angular, I didn't realize the side
nav's highlighting of the active route wasn't working. That's fixed
here.
  • Loading branch information
mehaase committed Mar 11, 2019
1 parent b522630 commit ae9930b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/src/components/side_nav_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:angular_router/angular_router.dart';
selector: 'ma-side-nav-item',
templateUrl: 'side_nav_item.html',
styleUrls: const ['side_nav_item.css'],
directives: const [RouterLink]
directives: const [routerDirectives]
)
class SideNavItem {
@Input()
Expand Down
3 changes: 2 additions & 1 deletion lib/src/components/side_nav_item.html
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<a [routerLink]='route.toUrl()'><ng-content></ng-content></a>
<a [routerLink]='route.toUrl()'
[routerLinkActive]="'router-link-active'"><ng-content></ng-content></a>

0 comments on commit ae9930b

Please sign in to comment.