# Class TableCreateButtonDirective<Data>

#### Type Parameters

- Data extends Record<string, any>

#### Implements

- OnInit
- OnDestroy

- Defined in packages/angular/material/table-system/src/lib/table-create-button/table-create-button.directive.ts:24

#####
Index

### Constructors

constructor

### Properties

dataSource

### Methods

ngOnDestroy
ngOnInit
onClick

##
Constructors

### constructor

- new TableCreateButtonDirective<Data extends Record<string, any>>(
  method: Method<any, Data | Observable<Data>>,
  elementRef: ElementRef,
  renderer: Renderer2,
  ): TableCreateButtonDirective<Data>

  #### Type Parameters

  - Data extends Record<string, any>

  #### Parameters

  - method: Method<any, Data | Observable<Data>>
  - elementRef: ElementRef
  - renderer: Renderer2

  #### Returns TableCreateButtonDirective<Data>

  - Defined in packages/angular/material/table-system/src/lib/table-create-button/table-create-button.directive.ts:34

##
Properties

### dataSource

dataSource: TableDataSourceDirective<Data>

- Defined in packages/angular/material/table-system/src/lib/table-create-button/table-create-button.directive.ts:30

##
Methods

### ngOnDestroy

- ngOnDestroy(): void

  A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.

  #### Returns void

  Implementation of OnDestroy.ngOnDestroy

  - Defined in packages/angular/material/table-system/src/lib/table-create-button/table-create-button.directive.ts:52

### ngOnInit

- ngOnInit(): void

  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

  - Defined in packages/angular/material/table-system/src/lib/table-create-button/table-create-button.directive.ts:44

### onClick

- onClick(): Promise<void>

  #### Returns Promise<void>

  - Defined in packages/angular/material/table-system/src/lib/table-create-button/table-create-button.directive.ts:59