### File

`src/lib/directives/form-reset.directive.ts`

### Extends

`ConfirmClick`

### Metadata

Selector | `[rxapFormReset]`
Standalone | `true`

### Index

###### Methods

- Protected execute

###### Inputs

- type

### Constructor

`constructor(formDirective: FormDirective)`
Defined in src/lib/directives/form-reset.directive.ts:22

Parameters :

Name | Type | Optional
formDirective | `FormDirective` | No

### Inputs

type
Type : `string`
Default value : `'button'`
Defined in src/lib/directives/form-reset.directive.ts:22

### Methods

Protected execute
`execute()`
Defined in src/lib/directives/form-reset.directive.ts:30
Returns : `void`

    import {
      Directive,
      HostBinding,
      Inject,
      Input,
    } from '@angular/core';
    import { ConfirmClick } from '@rxap/directives';
    import { FormDirective } from './form.directive';

    @Directive({
      selector: '[rxapFormReset]',
      host: {
        '(click)': 'onClick()',
        '(confirmed)': 'onConfirm()',
      },
      standalone: true,
    })
    export class FormResetDirective extends ConfirmClick {

      @HostBinding('type')
      @Input()
      public type = 'button';

      constructor(
        @Inject(FormDirective) private readonly formDirective: FormDirective,
      ) {
        super();
      }

      protected execute() {
        this.formDirective.reset();
      }

    }

# results matching ""

# No results matching ""