Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    On your child component try <input formControlName="projectName"> and <input formControlName="projectSource"> Commented Sep 25, 2019 at 3:18
  • 1
    @HuiZhao, you needn't subscribe to status change to enabled a button, just in .html `<button [enabled]="this.mainForm.get('child1Form').valid">submit</button>. But take account Joao say: use formControlName in child Commented Sep 25, 2019 at 6:35
  • @Eliseo, I have several child forms, child1 is just an example for demo. Commented Sep 25, 2019 at 9:22
  • My bad, I forgot to add formControlName in the demo, just updated it. I have it in my real code. Commented Sep 25, 2019 at 9:39
  • [enabled]="this.mainForm.valid">submit</button> for whole form Commented Sep 25, 2019 at 13:27