File

src/app/core/navigation/administration/administration.component.ts

Implements

OnInit

Metadata

selector cd-administration
styleUrls ./administration.component.scss
templateUrl ./administration.component.html

Index

Properties
Methods

Constructor

constructor(authStorageService: AuthStorageService)
Parameters :
Name Type Optional
authStorageService AuthStorageService No

Methods

ngOnInit
ngOnInit()
Returns : void

Properties

userPermission
Type : Permission
import { Component, OnInit } from '@angular/core';

import { Permission } from '../../../shared/models/permissions';
import { AuthStorageService } from '../../../shared/services/auth-storage.service';

@Component({
  selector: 'cd-administration',
  templateUrl: './administration.component.html',
  styleUrls: ['./administration.component.scss']
})
export class AdministrationComponent implements OnInit {
  userPermission: Permission;

  constructor(private authStorageService: AuthStorageService) {
    this.userPermission = this.authStorageService.getPermissions().user;
  }

  ngOnInit() {}
}
<div dropdown
     *ngIf="userPermission.read">
  <a dropdownToggle
     class="dropdown-toggle"
     data-toggle="dropdown"
     i18n-title
     title="Dashboard Settings">
    <i class="fa fa-fw fa-cog"></i>
    <span i18n
          class="visible-xs-inline-block">Dashboard Settings</span>
    <span class="caret"></span>
  </a>
  <ul *dropdownMenu
      class="dropdown-menu dropdown-menu-right">
    <li *ngIf="userPermission.read">
      <a i18n
         class="dropdown-item"
         routerLink="/user-management">User management</a>
    </li>
  </ul>
</div>

./administration.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""