I have a directive which takes an object, and the directive is under a element which contain ng-repeat on array of objects, what i want try to achieve is to reorder the array and passed the object based on some object property (which is a numeric one say precedence )
<elem ng-repeat="element in array | orderBy:'precedence ' ">
<my-directive item='element'></my-directive>
</elem>
so what i want is that all the element to be passed to directive must be reorder based on precedence.
and also inside each object there will be array of sub-objects with same blueprint (clone of parent object).