form.customer.json
{
"key": "profileDetails.address.addressDetails[].country.masterCode",
"ngModelOptions": { "updateOn": "change blur" },
"autopopulateTo": [
"serviceUser.serviceUser.address.addressDetails[0].country.masterCode"
],
"validationMessage": {
"1": "This field is required"
}
}
{
"key": "profileDetails.address.addressDetails[].province.masterCode",
"reload": {
"service": "CustomerProfileProvinceLoader",
"fetchAction": "load",
"updateAction": "updateValues",
"watch": [
"profileDetails.address.addressDetails[arrayIndex].country.masterCode"
]},
"autopopulateTo": [
"serviceUser.serviceUser.address.addressDetails[0].province.masterCode"
],
"ngModelOptions": {
"updateOn": "change blur"
},
"disabled": "!model.profileDetails.address.addressDetails[arrayIndex].country.masterCode",
"validationMessage": {
"1": "This field is required"
}
}
schema.customer.json
"province": {
"type": "object",
"properties": {
"masterCode": {
"title": "Province",
"description": "Select province",
"type": [
"null",
"string"
],
"enum": []
}
},
"required": [
"masterCode"
]
},
"country": {
"type": "object",
"properties": {
"masterCode": {
"title": "Country",
"description": "Select country",
"type": [
"null",
"string"
],
"enum": []
}
},
"required": [
"masterCode"
]
}
数据:
{
"code" : "Country1",
"name" : "Country1",
"default" : "Y",
"provinces" : {
"province" : [
{
"code" : "P1",
"name" : "PROVINCE1",
"cities" : {
"city" : [
{
"code" : "1234",
"name" : "city1",
"default" : "Y"
}
]
}
},
{
"code" : "P2",
"name" : "PROVINCE2",
"cities" : {
"city" : [
{
"code" : "c1",
"name" : "city2"
},
{
"code" : "c2",
"name" : "city3"
}
]
}
}
]
}
}
在上面的代码国家/地区字段中是一个下拉列表。每当我更改国家/地区字段值“ RangeError:超出最大调用堆栈大小”时,都会产生该错误。并且应该取消选择的省份字段没有发生。
问题在于我加载到country字段中的数据。因为每当我加载以上数据(包含provinces.province)时,都会引发错误。