Top "Angular2-formbuilder" questions

Questions about Angular FormBuilder, a built-in API for creating instances of a FormControl / FormGroup / or FormArray using less code.

formGroup expects a FormGroup instance

I have an Angular 2 RC4 basic form example on Plunkr that appears to throw the following error (In Chrome DEV …

angular angular2-forms angular2-formbuilder
ngModel cannot be used to register form controls with a parent formGroup directive

After upgrading to RC5 we began getting this error: ngModel cannot be used to register form controls with a parent …

angular angular2-forms angular2-formbuilder
Reactive Forms - mark fields as touched

I am having trouble finding out how to mark all form's fields as touched. The main problem is that if …

angular angular-reactive-forms angular2-forms angular2-formbuilder
Two way binding in reactive forms

Using Angular 2, two-way binding is easy in template-driven forms - you just use the banana box syntax. How would you …

angular angular2-forms angular2-formbuilder
Form control valueChanges gives the previous value

I have a form control with name 'question1' within the form object parentForm and I have subscribed to it …

angular angular2-forms angular2-formbuilder
What is the difference between formControlName and FormControl?

I'm using ReactiveFormsModule of Angular2 to create a component that contains a form. Here is my code: foo.component.ts: …

angular radio-button angular2-forms form-control angular2-formbuilder
How to append new FormGroup or FormControl to form

I have the following form in Angular created with FormBuilder: constructor(private fb: FormBuilder) { this.myForm = fb.group({ 'name': ['', […

forms angular angular2-forms angular2-formbuilder
Angular FormControl valueChanges doesn't work

I want to get one of my forms ("family") value if changed by subscribing but it seems something is wrong …

angular angular2-forms angular2-formbuilder
How to iterate formgroup with array in Angular2

I'm working on a model driven form and I can't get it to add items to a list being displayed …

forms angular angular2-formbuilder
How to initialize form group in Angular 4?

I have the following ngOnInit method: ngOnInit() { this.countries = this.sharedService.getCountries(); this.shopService.getCurrentShopFromCache().then(shop => { this.shop = …

angular angular2-formbuilder