I have a certain form that is made as angular directive template. It contains several INPUT fields in certain order. I can not construct that form dynamically using ng-repeat approach, because some fields have custom behaviour, special validators and such.
<div ID="1"> input field 1</div>
...
<div ID="7"> input field 7</div>
I however have a need to display these input in different random order under some use case. The logic and contents of form remains the same but just one input that used to be 7th should become 1st. It would be great if I can achieve it using a CSS class that is conditionally applied to certain elements (likely, using ng-class option).
What CSS I can possibly use to keep the same template (sketched above) but have visually "div id=7" to appear before "div id=1" ?
I prefer to avoid DOM manipulating and have it angular-friendly way.