I've a question in angularjs.
In my controller, I've a comma separated string, and I will show it in my index.html(with ng-repeat)
Here is my controller:
myApp.controller('TabsDemoCtrl',function($scope,$http){
$http.get('/performbatch').success(function(data) {
$scope.string = 'Gzrgh,1,2,1,4,1,1,1,20150304,20180304';
$scope.arrString = new Array();
$scope.arrString = $scope.string.split(',');
});
Here is my html :
<div ng-controller="TabsDemoCtrl">
<td ng-repeat="icerik in arrString">
{{icerik}}
</td>
</div>
But I couldn't achieve that. Can you help me? Thanks in advance.
You can't have td
outside table
.
It must be like
<div ng-repeat="icerik in arrString track by $index">
{{icerik}}
</div>
Also since some are duplicates items, you must add track by $index
as well