title: AngularJS - How to change order of divs?
body: <p>How do I change the order <code>div</code> elements are displayed in given a preferred order? I am making my application in AngularJS, so pure JavaScript or Angular based answers are welcome.  </p>
  
  <p>Here's what my html looks like:</p>
  
  <pre><code>&lt;div id="A"&gt;{{content for A}}&lt;/div&gt;
  &lt;div id="B"&gt;{{content for B}}&lt;/div&gt;
  &lt;div id="C"&gt;{{content for C}}&lt;/div&gt;
  </code></pre>
  
  <p>In my script there are variables that describe preferred order:  </p>
  
  <pre><code>orderOfA = 2;
  orderOfB = 3;
  orderOfC = 1;
  </code></pre>
  
  <p>I want to render the contents so, based on the above values for example, the order of <code>div</code> is <code>C</code>, <code>A</code>, <code>B</code>.</p>