UNPKG

@rxap/authorization

Version:

Provides an Angular module and directives to manage authorization and permissions in your application. It allows you to control the visibility and enabled state of UI elements based on user permissions. The package includes an `AuthorizationService` to ch

19 lines (18 loc) 1.13 kB
import { ChangeDetectorRef, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; import { AuthorizationService } from './authorization.service'; import * as i0 from "@angular/core"; export declare class IfHasPermissionDirective implements OnInit, OnDestroy { private readonly authorization; private readonly template; private readonly viewContainerRef; private readonly cdr; private readonly scope; identifier: string; else?: TemplateRef<any>; private _subscription?; constructor(authorization: AuthorizationService, template: TemplateRef<any>, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, scope?: string | null); ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration<IfHasPermissionDirective, [null, null, null, null, { optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<IfHasPermissionDirective, "[rxapIfHasPermission]", never, { "identifier": { "alias": "rxapIfHasPermission"; "required": true; }; "else": { "alias": "rxapIfHasPermissionElse"; "required": false; }; }, {}, never, never, true, never>; }