Answers for "nebular menu item disabled"

0

nebular menu item disabled

// hide menu when user doesn't have the role and permissions.
if (prepared.roles && prepared.roles.length > 0) {
  const role = this.authService.getUser().role;
  if (prepared.roles.indexOf(role) === -1) {
    prepared.hidden = true;
  }
}
Posted by: Guest on June-02-2020

Browse Popular Code Answers by Language