Should I use <form> when I use <mat-form-field> while building a Form?

Discussão em 'Angular' iniciado por Omar, Fevereiro 6, 2025.

  1. Omar

    Omar Guest

    I'm building a form and I'm confused if I should use mat-form-field tag from angular material alone without form tag, or I should wrapp everything with form html tag like the following

    <form>
    <mat-form-field>
    <mat-label>name</mat-label>
    <input matInput type="text" name="text">
    </mat-form-field>
    </form>


    so what's the best practice to follow Thanks in advance

    Continue reading...

Compartilhe esta Página