Skip to content

Commit 1a056c5

Browse files
committed
Style navigation items differently when currently active
1 parent b334598 commit 1a056c5

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

projects/train-platform/src/app/navbar/navbar.component.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ li {
2222
padding-right: 0.5rem;
2323
}
2424

25+
.active-nav-item {
26+
cursor: default;
27+
text-decoration: none;
28+
}
29+
2530
.page-options {
2631
display: flex;
2732
flex-direction: row;

projects/train-platform/src/app/navbar/navbar.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<nav>
22
<ul>
33
<li>
4-
<a routerLink="/">{{ "navbar.home" | translate }}</a>
4+
<a routerLink="/" routerLinkActive="active-nav-item" [routerLinkActiveOptions]="{exact: true}">{{ "navbar.home" | translate }}</a>
55
</li>
66
</ul>
77
<div class="page-options">

0 commit comments

Comments
 (0)