fbessou / angular2-schema-form-demo

12 stars 19 forks source link

[Questions] Too magical for me :) #10

Closed mikaelcom closed 7 years ago

mikaelcom commented 7 years ago

Hi, great project, just a question: how the model is bound as you don't specify it into the app.component.html with the [model] attribute and it succeeds to update the model anyway when you type into the generated fields. I'm lost :disappointed:

Another question, binding seems to require to match the hierarchy of the fields based on the fieldsets when you pass through the data but not in your demo. Am I missing something else?

fbessou commented 7 years ago

Hi, great project, just a question: how the model is bound as you don't specify it into the app.component.html with the [model] attribute and it succeeds to update the model anyway when you type into the generated fields. I'm lost :disappointed:

model is the input data, it only provides the initial value of the form, so it can't be used to retrieve the current value of the form. The actual value of the form is computed internally and emitted through the onChange output.

Another question, binding seems to require to match the hierarchy of the fields based on the fieldsets when you pass through the data but not in your demo. Am I missing something else?

I don't understand this one ^^

fbessou commented 7 years ago

Maybe your second question is the same as #11 ?

mikaelcom commented 7 years ago

indeed, the second question is related to the issue #11, thx