Skip to content

Instantly share code, notes, and snippets.

@goughjo02
Last active February 25, 2019 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goughjo02/189a36df947f6644f677354bac9dd7ee to your computer and use it in GitHub Desktop.
Save goughjo02/189a36df947f6644f677354bac9dd7ee to your computer and use it in GitHub Desktop.
// child-form-component.ts
@Component({
selector: "child-form-component",
templateUrl: "./child-form.component.html"
})
export class ChildFormComponent implements OnInit {
_formValue: FormGroup;
@Input()
get form() {
return this._formValue;
}
@Output() formChange = new EventEmitter();
set form(val) {
this._formValue = val;
this.formChange.emit(this._formValue);
}
constructor() {}
ngOnInit() {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment