#example.push() is not a function

15 messages · Page 1 of 1 (latest)

blissful barn
#

I get example.push() is not a function error and nothing on the internet seems to fix this error for seems to fix it

nimble umbra
#

@blissful barn Can you show the implementation of addBookForm ?

#

seems like result is not of FormArray type at runtime.

blissful barn
#

@nimble umbra

dusky dagger
#

And given your snippets you can remove FormBuilder as you are not using it anymore. At least for consistency by using it should use it everywhere in your code.

blissful barn
#

@dusky dagger i did now i got this error field 43 in html is label field

#

why does it point to the label field

dusky dagger
blissful barn
#

oh forgot to change that

dusky dagger
#

That's not just about changing it to formArrayName though but I won't be able to help further today. You can take a look at the documentation or wait for someone else to help:)

blissful barn
#

i actually fixed it

#

thank you

nimble umbra
#

perfect if everything is working fine. I thought of something like that

#

using formbuilder let you avoid all the instanciation of FormGroup and FormControl; but choose to use either one or the other but not both