var tags_offset=[];
$scope.getRelations = function(id, ref, subRef=0){
tags_offset[ref+'-'+subRef]=0;
$http.get( CONS.appHttp+ '/tags.php?ID='+id
+'&ref='+ref
+'&contentType='+subRef
+'&offset='+tags_offset[0] ).success(function( data ){
if(tags_offset > 0){
$scope.tagRelations[ref+'-'+subRef] = $scope.tagRelations[ref+'-'+subRef].concat( angular.fromJson( data ));
$scope.tagRelations[ref+'-'+subRef].next = data.next;
tags_offset[ref+'-'+subRef]++;
}else{
$scope.tagRelations[ref+'-'+subRef] = angular.fromJson( data );
tags_offset[ref+'-'+subRef]++;
}
});
}
I would like the format to be like this: $scope.tagRelations.((ref+'-'+subRef)) for example
$scope.tagRelations.content-1
$scope.tagRelations.video-2
I want to modify
$scope.tagRelations[ref+'-'+subRef]
...........................................................................