HTML:
<input type="number" ng-model="data.price1[$index]" ng-change="pricecalc1($index)" placeholder="Enter Product Price">
js:
ng-model声明:
$scope.data={price1:[]};
我将动态值插入此数组,结果为{[&#34; 100,200,300&#34;]}
但我需要插入动态值,如{[&#34; 100&#34;,&#34; 200&#34;,&#34; 300&#34;]}或[{price:&# 39; 100&#39;},{价:&#39; 200&#39;},{价:&#39; 300&#39;}];
帮我解决这个问题。提前致谢