Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo with Angular FormGroup #232

Open
Halanson opened this issue Jun 28, 2023 · 0 comments
Open

Demo with Angular FormGroup #232

Halanson opened this issue Jun 28, 2023 · 0 comments

Comments

@Halanson
Copy link
Contributor

Halanson commented Jun 28, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant