Change field parent bind.
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user