I'm new at Angular and my question is this. I have to get user's details and based on user type I want to show different things.
public user = [];
ngOnInit() {
this.httpServiceToServe.getType().subscribe(
data => this.user = data
);
}
For instance, if this user is admin, I want to show the Dashboard:
<li routerLinkActive="active" *ngIf="user.type == 'admin'">
<a routerLink="/adminDashboard">
<i class="now-ui-icons education_atom"></i>
<p>Admin Dashboard</p>
</a>
</li>