Note that ng-model="model[options.key].value" instead of ng-model="model[options.key]". I do this in order to have a nested model:
{ myKey: { value: myValue, type: string, ... } }
The problem is that if I use the defaultValue property in the form definition I get an error in radio buttons:
TypeError: Cannot create property 'value' on string 'default value'
It seems that the defaultValue property ignores the ng-model attribute that I define in the template.
Shouldn't I define the ng-model in this way? I know that I could define a nested key (key: myKey.value) in the form definition to accomplish the same thing, but I would like to hide that to the final user who defines the form.
Hi, I am using a slightly modified version of the Bootstrap Template. For instance, the radio element type looks:
Note that
ng-model="model[options.key].value"
instead ofng-model="model[options.key]"
. I do this in order to have a nested model:The problem is that if I use the defaultValue property in the form definition I get an error in radio buttons:
It seems that the defaultValue property ignores the
ng-model
attribute that I define in the template.Shouldn't I define the
ng-model
in this way? I know that I could define a nested key (key: myKey.value
) in the form definition to accomplish the same thing, but I would like to hide that to the final user who defines the form.