0
<p-calendar  id="editFFdate" [required]="true" [showIcon]="true" [(ngModel)]="editFFdate" name="editFFdate" [monthNavigator]="true" [yearNavigator]="true" yearRange="2000:2030" showButtonBar="true">
      </p-calendar>

如何使用 *ngxPermissions 使 p-calender 仅对特定角色启用

4

1 回答 1

0

您可以在 ng-template 中添加 p-calendar,例如:

<div *ngxPermissionsOnly="['ADMIN', 'GUEST']">
  <p-calendar  id="editFFdate" [required]="true" [showIcon]="true" 
    [(ngModel)]="editFFdate" name="editFFdate" [monthNavigator]="true" 
     [yearNavigator]="true" yearRange="2000:2030" showButtonBar="true">
  </p-calendar>
</div>
于 2018-12-31T12:34:56.703 回答