Tutorial by Examples: activeform

This example uses Angular 2.0.0 Final Release registration-form.component.ts import { FormGroup, FormControl, FormBuilder, Validators } from '@angular/forms'; @Component({ templateUrl: "./registration-form.html" }) export class ExampleComponent { ...
app.module.ts Add these into your app.module.ts file to use reactive forms import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AppComponent } from './app.comp...
You can enable/disable ajax and client validations in active form. $form = ActiveForm::begin([ 'id' => 'signup-form', 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'validationUrl' => Url::to('signup'), ]); enableClientValidation is by defaul...
app.module.ts Add these into your app.module.ts file to use reactive forms import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; @...
This example requires FormsModule and ReactiveFormsModule. Please import them in your application/module. import {FormsModule, ReactiveFormsModule} from '@angular/forms'; input-form-example.html <form class="example-form" (ngSubmit)="submit(addForm.value)" [formGroup]=&qu...

Page 1 of 1