Change field parent bind.

This commit is contained in:
Alexis Lahouze
2017-07-21 00:06:07 +02:00
parent 4064848242
commit b95f36f09c
2 changed files with 5 additions and 5 deletions

View File

@ -59,12 +59,12 @@ import { Account } from './account';
})
export class AccountFormComponent implements AfterViewChecked {
@Input() account: Account;
@Output() onFormChanged: EventEmitter<NgForm> = new EventEmitter<NgForm>();
@Output() onValid: EventEmitter<boolean> = new EventEmitter<boolean>();
@ViewChild('form') form: NgForm;
constructor() {}
ngAfterViewChecked() {
this.onFormChanged.emit(this.form);
this.onValid.emit(this.form.form.valid);
}
}