angular 2 model driven nested form components

前端 未结 3 2077
走了就别回头了
走了就别回头了 2021-02-06 08:35

What I have:

I am building an ionic 2 app and have built a basic angular 2 component that contains

  • An input field

  • A lab

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-06 09:07

    You can @Input your loginForm into nested component, as let's say parentForm. Then register nested formGroup to parentForm on child component init, and unregister it on child component destroy.

提交回复
热议问题