IMPORTANT!
This forum is now archived. Click here for the New Support Forum
Incorrect display in mat-sidenav-content
Quote from Ingo on August 7, 2018, 1:33 pmHi,
After logging in, the application will appear as shown in the attachment. Only after a hide and show again everything is displayed to me correctly. Unfortunately, I have not found the cause so far. Can someone give me a hint here.
regards Ingo
Hi,
After logging in, the application will appear as shown in the attachment. Only after a hide and show again everything is displayed to me correctly. Unfortunately, I have not found the cause so far. Can someone give me a hint here.
regards Ingo
Quote from KanKathir on August 13, 2018, 9:02 amMe too faced same problem. I did below to fix.
Edit : app.component.ts
Add below two declarations :
@ViewChild('mainNav') sideNav: MatSidenav;
isAppStartup: boolean = true;
And Edit ngOnInit() as below
this.router.events.subscribe(event => {
if (event instanceof NavigationStart) {
let url = (<NavigationStart>event).url;if (url !== url.toLowerCase()) {
this.router.navigateByUrl((<NavigationStart>event).url.toLowerCase());
}// to fix side nav overlap
if (this.isUserLoggedIn && this.isAppStartup && this.sideNav) {
this.sideNav.toggle();
}if (this.adminExpander && url.indexOf('admin') > 0) {
this.adminExpander.open();
}// to fix side nav overlap
if (this.isUserLoggedIn && this.isAppStartup && this.sideNav) {
this.sideNav.toggle();
this.isAppStartup = false;
}
}Hope this helps you..
Me too faced same problem. I did below to fix.
Edit : app.component.ts
Add below two declarations :
@ViewChild('mainNav') sideNav: MatSidenav;
isAppStartup: boolean = true;
And Edit ngOnInit() as below
this.router.events.subscribe(event => {
if (event instanceof NavigationStart) {
let url = (<NavigationStart>event).url;
if (url !== url.toLowerCase()) {
this.router.navigateByUrl((<NavigationStart>event).url.toLowerCase());
}
// to fix side nav overlap
if (this.isUserLoggedIn && this.isAppStartup && this.sideNav) {
this.sideNav.toggle();
}
if (this.adminExpander && url.indexOf('admin') > 0) {
this.adminExpander.open();
}
// to fix side nav overlap
if (this.isUserLoggedIn && this.isAppStartup && this.sideNav) {
this.sideNav.toggle();
this.isAppStartup = false;
}
}
Hope this helps you..
IMPORTANT!
This forum is now archived. Click here for the New Support Forum