In my AngularJS view, I have the following setup:
<label class="control-label">Name:</label>
<input type="text" class="form-control" ng-model="config.name" />
<br />
<label class="control-label">versionSpecificApiConfig:</label>
<input type="text" class="form-control" ng-model="config.versionSpecificApiConfig" />
<br />
<label class="control-label">schemaUrl:</label>
<input type="text" class="form-control" ng-model="config.versionSpecificApiConfig.schemaUrl" />
<br />
I'm setting this up to achieve a specific structure for the config object:
{
"name":"string",
"versionSpecificApiConfig":{
"string":{
"schemaUrl":"string"
}
}
}
However, I encountered an error stating "cannot set property for string in versionSpecificApiConfig field". Can someone assist me in creating a structure like this? (The use of "string" in the structure refers to the respective values of the textboxes).