$scope.entity = {specificationOptionList:[]};
//增加规格选项行
$scope.addTableRow = function() {
$scope.entity.specificationOptionList.push({});
}
执行代码报错(AngularJS对象中定义数组定义数组的格式好像有问题):
TypeError: Cannot read property 'push' of undefined
at h.$scope.addTableRow (VM99 specificationController.js:87) |
|