Skip to content

Demo with Angular FormGroup #232

Description

@Halanson

We like to use Slate-Angular in the context of angulars FormGroup. For example to validate a required input field. Something like:

<mat-form-field>
    <slate-editable 
        formControlName="requiredInput"
        required
        [editor]="editor"
        [keydown]="keydown()"
        [renderElement]="renderElement()"
        [renderText]="renderText()"
      >
    <mat-error ngIf="myForm.controls.requiredInput.errors['required']">
        This input is required.
    </mat-error>
</mat-form-field>

Could you add a demo on how to achieve this? Or point me in the right direction and I will provide a PR with a demo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions