I'm using angular 5 for my project. Where I'm using 2 different layouts as public (login page) & secure (other pages). I want to apply css class to <body>
in index.html conditionally. That is,
The
class="fixed-nav sticky-footer bg-light"
should be applied to<body>
only on visiting Secure Layout, but not for Public Layout.
But I'm unable to achieve that. Please help me to tackle it.
Here is my code -
secure.component.html -
<app-navbar></app-navbar>
<div class="content-wrapper">
<div class="container-fluid">
<router-outlet></router-outlet>
</div>
</div>
<app-footer></app-footer>
public.component.html -
<router-outlet></router-outlet>
app.component.html -
<router-outlet></router-outlet>
index.html -
<body>
<app-root></app-root>
</body>