Sorting an array of objects in ng-repeat using orderBy
<p>I have an array of objects and I am trying to sort (or group) them by a boolean object attribute with using angularjs' ng-repeat functionality.</p>

<p>I tried using orderBy and groupBy but none of them worked.</p>

<p>here is my html:</p>

<pre><code>&lt;tbody md-body&gt;
                        &lt;tr md-row ng-repeat="item in dashboardCtrl.unAckAlertList | limitTo : 4 | orderBy: 'item.urgent'"&gt;
                            &lt;td md-cell&gt;
                                &lt;i ng-if="item.urgent" class="fa fa-warning" style="font-size:22px;color:red;"&gt;&lt;/i&gt;&lt;i ng-if="!item.urgent" class="fa fa-warning" style="font-size:22px;color:slategray;"&gt;&lt;/i&gt;&lt;span&gt;&lt;b&gt; {{item.status}}&lt;/b&gt;&lt;/span&gt;
                            &lt;/td&gt;
                            &lt;td md-cell&gt;
                                {{item.MyName}} / {{item.sourceProperty}}
                            &lt;/td&gt;
                            &lt;td md-cell&gt;
                                {{item.name}}
                            &lt;/td&gt;
</code></pre>

<p>It never worked and I wonder why.</p>