Angular Forms

Template-driven forms

Template-driven forms are useful for adding a simple form to an app. They're easy to add, but they don't scale as well as reactive forms. If you have very basic form requirements and logic that can be managed solely in the template, use template-driven forms.

NgModel, NgForm, and NgModelGroup are the three directives defined in the FormsModule that you need to know about to build a template-driven form.

Form Controls

Radio Buttons

True Or False

<div class="frm-row">
    <label> <input [(ngModel)]="extended" type="radio"
        [value]="true" name="extended"> Normal </label>
    <label> <input [(ngModel)]="extended" type="radio"
        [value]="false" name="extended"> Extended </label>
</div>

Additional Resources