Added the route name as an Id on the container div #1698

pull/1654/head
Jamie 7 years ago
parent 874d90d894
commit 33177b9c08

@ -112,6 +112,6 @@
</nav>
<div [ngClass]="{'container top-spacing': showNav}">
<div [ngClass]="{'container top-spacing': showNav}" id="{{currentUrl}}">
<router-outlet></router-outlet>
</div>

@ -19,6 +19,7 @@ export class AppComponent implements OnInit {
public user: ILocalUser;
public showNav: boolean;
public updateAvailable: boolean;
public currentUrl: string;
constructor(public notificationService: NotificationService,
public authService: AuthService,
@ -41,6 +42,7 @@ export class AppComponent implements OnInit {
this.settingsService.getCustomization().subscribe(x => this.customizationSettings = x);
this.router.events.subscribe((event: NavigationStart) => {
this.currentUrl = event.url;
if (event instanceof NavigationStart) {
this.user = this.authService.claims();
this.showNav = this.authService.loggedIn();

Loading…
Cancel
Save