As I already said in the comments: you are trying to use the filter orderBy
with an object
, but this filter only works with Arrays
, you will have to either change the model to an Array
or make your own filter
.
I will give you a solution for the first option.
In your controller do this:
$scope.dataAttributesArray =
Object.keys($scope.instancesData.Attributes).map(function(key){
return {key:key, val:$scope.instancesData.Attributes[key]};
});
And then in your view you can do this:
<th ng-repeat="attribute in dataAttributesArray | orderBy:'val.ColPos'" data-x="{{value.ColPos}}" >
<span>{{attribute.key}}</span>
</th>