问题
I would like create reusable input group component with DE/EN data.
I'm looking for, once all the mandatory fields are filled for EN and DE then submit button should get enabled. And also should get all the data in JSON format.
Here the sample https://stackblitz.com/edit/angular-avjyct?file=app/app.component.ts
I have been trying but stuck. Expert advise please?
回答1:
Looks like you wanted to pass string value to your child component but passed undefined
instead:
[en]="label1_en"
^^^^^^^^^
there is no such property in your component.
You can pass string like:
[en]="'label1_en'"
or
en="label1_en"
Forked Stackblitz
来源:https://stackoverflow.com/questions/56541130/angular-reactive-form-child-component