feat(forms): update forms to latest version

This commit is contained in:
nixa 2016-07-08 13:10:36 +03:00
parent 4dfd7e8c28
commit 44924aefcc
7 changed files with 31 additions and 30 deletions

View file

@ -1,5 +1,5 @@
import {Component, ViewEncapsulation} from '@angular/core';
import {FORM_DIRECTIVES, FormBuilder, ControlGroup, Validators, AbstractControl} from '@angular/common';
import {FormGroup, AbstractControl, FormBuilder, Validators} from '@angular/forms';
import {EmailValidator, EqualPasswordsValidator} from '../../theme/validators';
@Component({
@ -11,12 +11,12 @@ import {EmailValidator, EqualPasswordsValidator} from '../../theme/validators';
})
export class Register {
public form:ControlGroup;
public form:FormGroup;
public name:AbstractControl;
public email:AbstractControl;
public password:AbstractControl;
public repeatPassword:AbstractControl;
public passwords:ControlGroup;
public passwords:FormGroup;
public submitted:boolean = false;
@ -33,7 +33,7 @@ export class Register {
this.name = this.form.controls['name'];
this.email = this.form.controls['email'];
this.passwords = <ControlGroup> this.form.controls['passwords'];
this.passwords = <FormGroup> this.form.controls['passwords'];
this.password = this.passwords.controls['password'];
this.repeatPassword = this.passwords.controls['repeatPassword'];
}