我是新來的angularjs,嘗試這個,但不知道爲什麼它不工作。我使用了很多這裏找到的解決方案,但都沒有成功。ng-repeat不能正常工作
這裏是我的陣列分配到$ scope.data_params
這裏是我的代碼在HTML: -
<tr ng-repeat="item in data_params">
<td>{{item.name}}</td>
代碼在JS: -
$scope.data_params.push(result_params.dealers);
console.log($scope.data_params);
任何想法出了什麼問題?
你會得到什麼問題? –
@AkashKC顯示HTML部分no輸出。 – MuthaFury
請問您可以使用'$ scope.data_params.push(result_params.dealers [0])進行更改;' –