-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
This is exactly like showed in docs, but it is keep giving the error in browser console.
<div class="mdl-layout__header-row">
<!-- Add spacer, to align navigation to the right -->
<div class="mdl-layout-spacer"></div>
<!-- Navigation with router directives-->
<nav class="mdl-navigation">
<a class="mdl-navigation__link" [routerLink]="['/user-profile']">User Profile</a>
<a class="mdl-navigation__link" [routerLink]="['/advance-user-profile']">Advance User Profile</a>
<a *ngIf="can('admin')" class="mdl-navigation__link" [routerLink]="['/contact-user']">Contact User</a>
</nav>
</div>
This is the error
ERROR TypeError: Cannot read property 'roles' of undefined
at AppComponent.AclService.can (index.js:181)
However, I have setup the permission for user and even logging this.aclService.getRoles()
shows the correct user role. And after that is throws the above error.
Any help would be much appreciated.
Metadata
Metadata
Assignees
Labels
No labels