@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
143 lines (74 loc) • 3.9 kB
Markdown
[**@rxap/authorization v19.0.3**](../README.md)
***
[@rxap/authorization](../globals.md) / MatButtonHasEnablePermissionDirective
# Class: MatButtonHasEnablePermissionDirective
Defined in: [mat-button-has-enable-permission.directive.ts:29](https://gitlab.com/rxap/packages/-/blob/15b5fab8912b1042ea325e7f4d98844416018df1/packages/angular/authorization/src/lib/mat-button-has-enable-permission.directive.ts#L29)
## Extends
- [`HasEnablePermission`](HasEnablePermission.md)
## Implements
- `OnInit`
## Constructors
### new MatButtonHasEnablePermissionDirective()
> **new MatButtonHasEnablePermissionDirective**(`authorization`, `cdr`, `injector`, `scope`): [`MatButtonHasEnablePermissionDirective`](MatButtonHasEnablePermissionDirective.md)
Defined in: [mat-button-has-enable-permission.directive.ts:35](https://gitlab.com/rxap/packages/-/blob/15b5fab8912b1042ea325e7f4d98844416018df1/packages/angular/authorization/src/lib/mat-button-has-enable-permission.directive.ts#L35)
#### Parameters
##### authorization
[`AuthorizationService`](AuthorizationService.md)
##### cdr
`ChangeDetectorRef`
##### injector
`Injector`
##### scope
`string`
#### Returns
[`MatButtonHasEnablePermissionDirective`](MatButtonHasEnablePermissionDirective.md)
#### Overrides
[`HasEnablePermission`](HasEnablePermission.md).[`constructor`](HasEnablePermission.md#constructors)
## Properties
### cdr
> `protected` `readonly` **cdr**: `ChangeDetectorRef`
Defined in: [has-enable-permission.ts:28](https://gitlab.com/rxap/packages/-/blob/15b5fab8912b1042ea325e7f4d98844416018df1/packages/angular/authorization/src/lib/has-enable-permission.ts#L28)
#### Inherited from
[`HasEnablePermission`](HasEnablePermission.md).[`cdr`](HasEnablePermission.md#cdr-1)
***
### identifier
> **identifier**: `string`
Defined in: [mat-button-has-enable-permission.directive.ts:31](https://gitlab.com/rxap/packages/-/blob/15b5fab8912b1042ea325e7f4d98844416018df1/packages/angular/authorization/src/lib/mat-button-has-enable-permission.directive.ts#L31)
#### Overrides
[`HasEnablePermission`](HasEnablePermission.md).[`identifier`](HasEnablePermission.md#identifier)
## Methods
### ngOnDestroy()
> **ngOnDestroy**(): `void`
Defined in: [has-enable-permission.ts:60](https://gitlab.com/rxap/packages/-/blob/15b5fab8912b1042ea325e7f4d98844416018df1/packages/angular/authorization/src/lib/has-enable-permission.ts#L60)
A callback method that performs custom clean-up, invoked immediately
before a directive, pipe, or service instance is destroyed.
#### Returns
`void`
#### Inherited from
[`HasEnablePermission`](HasEnablePermission.md).[`ngOnDestroy`](HasEnablePermission.md#ngondestroy)
***
### ngOnInit()
> **ngOnInit**(): `void`
Defined in: [mat-button-has-enable-permission.directive.ts:53](https://gitlab.com/rxap/packages/-/blob/15b5fab8912b1042ea325e7f4d98844416018df1/packages/angular/authorization/src/lib/mat-button-has-enable-permission.directive.ts#L53)
A callback method that is invoked immediately after the
default change detector has checked the directive's
data-bound properties for the first time,
and before any of the view or content children have been checked.
It is invoked only once when the directive is instantiated.
#### Returns
`void`
#### Implementation of
`OnInit.ngOnInit`
#### Overrides
[`HasEnablePermission`](HasEnablePermission.md).[`ngOnInit`](HasEnablePermission.md#ngoninit)
***
### setDisabled()
> **setDisabled**(`disabled`): `void`
Defined in: [mat-button-has-enable-permission.directive.ts:49](https://gitlab.com/rxap/packages/-/blob/15b5fab8912b1042ea325e7f4d98844416018df1/packages/angular/authorization/src/lib/mat-button-has-enable-permission.directive.ts#L49)
#### Parameters
##### disabled
`boolean`
#### Returns
`void`
#### Overrides
[`HasEnablePermission`](HasEnablePermission.md).[`setDisabled`](HasEnablePermission.md#setdisabled)