title: AngularJS - ngOptions: How to order by Group Name and then by Label
body: <p>Let's assume I have the following data array in this form:</p>
  
  <pre><code>var data = [{group:GroupA, label: BB}, {group:GroupB, label: DD}.....].
  </code></pre>
  
  <p>My binding would be something like:</p>
  
  <pre><code>&lt;select data-ng-options="c as c.label group by c.group for c in data"&gt;&lt;/select&gt;
  </code></pre>
  
  <p>I would like the dropdown to list all the items with <code>GroupA</code> before <code>GroupB</code> while having them also sorted under each group. </p>
  
  <p>Something like this:</p>
  
  <pre><code>GroupA
  AA
  BB
  CC
  
  GroupB
  DD
  EE
  FF
  </code></pre>
  
  <p>I know I can use the <code>orderBy</code> Angular filter, but that doesn't really work the way I need. My guess is I have to write a custom filter that manually orders the list the way I want, but I was wondering if there is an easier way to accomplish the task. </p>