angular.module("myApp",["myDirective"])
.controller("myController",["$scope",function($scope){
$scope.data={
"one":["状态1","状态2","状态3","状态4"],
"one1":["状态1","状态2","状态3","状态4"],
};
$scope.choice="";
$scope.choice1="";
$scope.pane=[
{'title':'本月个人排行','text':'1','white':true,'data':'["名字","销售额","排名"]'},
{'title':"本月门店排行",'text':'1','white':false,'data':'["名字","销售额","排名"]'},
{'title':"上月个人排行",'text':'1','white':false,'data':'["名字","销售额","排名"]'},
{'title':"上月门店排行",'text':'1','white':false,'data':'["名字","销售额","排名"]'}
];
}]);
<table>
<tr ng-repeat="j in pane">
<td ng-repeat="x in j.data track by $index">{{x}}</td>
</tr>
</table>
但是出现了问题如下图 ,请问各位大神这个问题如何解决呢:(
{'title':'本月个人排行','text':'1','white':true,'data':'["名字","销售额","排名"]'},
j.data
是一个字符串。。{'title':'本月个人排行','text':'1','white':true,'data':["名字","销售额","排名"]},
这样试试