My navbar doesn’t react on page change
My app.component.html
<html>
<app-navbar></app-navbar>
<router-outlet></router-outlet>
</html>
This tag starts my navbar.component.html segment
<nav class="navbar navbar-expand-md justify-content-center" + {{navType}}>
If it matters here is the idea on the component page
navType: string = "nav-other";
if (this.router.url === '') {
this.navType = "navbar navbar-expand-md justify-content-center nav-splash";
}
The following were tried:
<nav class="navbar navbar-expand-md justify-content-center + {{navType}}">
<nav [ngClass]={{navType}}> // With full class exchanged for editing one word
<nav [ngClass]="navType"> // With full class exchanged for editing one word
New contributor
BabyLogan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.