Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141833 | Jan 7,2019 08:38 AM UTC | Jan 9,2019 05:21 PM UTC | Angular - EJ 2 | 1 |
![]() |
Tags: Sidebar |
export class AppComponent implements AfterViewChecked {
@ViewChild('sidebar')
public side: SidebarComponent;
public urlValue: String;
title = 'Synfusion Sidebar';
constructor(router: Router) {
router.events.forEach((event) => {
if (event instanceof NavigationEnd) {
this.urlValue = event.url;
}
});
}
ngAfterViewChecked() {
if (this.urlValue !== "/") {
this.side.hide();
} else {
this.side.show();
}
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.