1.2.2 • Published 6 years ago

meepo-permissions v1.2.2

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

qrcode for angular

<div *check="'admin';else elseBlock;">
    我是管理员
    <a (click)="quit()" class="weui-btn weui-btn_mini weui-btn_primary">退出登录</a>
</div>
<ng-template #elseBlock>
    我是不是管理员
    <a (click)="test()" class="weui-btn weui-btn_mini weui-btn_primary">管理员登录</a>
</ng-template>
import {
  Component, OnInit, ChangeDetectionStrategy,
  ViewChild, ElementRef, ChangeDetectorRef
} from '@angular/core';
import { EventService } from 'meepo-event';
import { } from '../../src/app/app';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class AppComponent {
  constructor(
    public event: EventService
  ) { }
  test() {
    this.event.publish('role.change', {
      items: ['admin']
    });
  }
  quit() {
    this.event.publish('role.change', {
      items: ['fans']
    });
  }
}
<div *check="'admin';else elseBlock;">
    我是管理员
    <a (click)="quit()" class="weui-btn weui-btn_mini weui-btn_primary">退出登录</a>
</div>
<ng-template #elseBlock>
    我是不是管理员
    <a (click)="test()" class="weui-btn weui-btn_mini weui-btn_primary">管理员登录</a>
</ng-template>

<div *checks="let item of items">
    {{item|json}}
</div>
1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.9

6 years ago

1.1.8

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago