I am currently working on an angular 6 application where users are assigned different roles that require distinct styling. Role 1 uses Stylesheet 1, while Role 2 uses Stylesheet 2.
The Navbar component is a crucial part of the overall layout structure of the application.
Recently, new requirements have emerged, stating that the Navbar must now be styled differently based on the user's role.
Currently, the styleUrls property in the @Component decorator only allows for one CSS file to be used. Is there a way to incorporate an ngIf directive so that if the routerLink is /user1, the navbar.css stylesheet is applied, and if it is /user2, the navbar2.css stylesheet is utilized?
@Component({
selector: 'jhi-navbar',
templateUrl: './navbar.component.html',
styleUrls: ['navbar.css']
})
Thank you!