I have routes defined in my app.component.ts file as follows
@View({
templateUrl: 'assets/home.html',
directives: [AccountManagerComponent, HeaderComponent, ROUTER_DIRECTIVES],
})
@RouteConfig([
{ path: '/home', name: 'Home', component: HomeComponent },
{ path: '/about', name: 'About', component: AboutComponent },
{ path: '/', name: 'IdentityManager', component: IdentityManagerComponent, useAsDefault: true}
])
template in home.html is as follow.
<header id="ag-header" class="app-header" role="banner"></header>
<section id="ag-content" class="page-login">
<router-outlet></router-outlet>
</section>
now i want to disable/hide 'header' element if i am at identitycomponent.
So can i view/hide directives in template based on the route?