I have a dataset that organizes it by choosing, growing or decreasing, or I can leave it in the order that it already is. The system works normally with the order of the elements, the problem is that the elements are only being shown when the sample order, ascending or descending, is selected in a select.
I would like to solve the question: how to show the elements without having to select the sample order so that this selection is indeed optional?
<select ng-model="selectedChoice">
<option ng-repeat="choice in choices" value="{{choice.name}}" ng-init="Todos">{{choice.name}}</option>
</select>
<div ng-if="selectedChoice == 'Crescente'">
<div class="col-12">
<div class="col-4 ladolado" ng-repeat="organ in organs | orderBy: '+name' " ng-if="organ.attachment.url != null">
<a href="{{organ.url}}" class="decoracao section">
<img ng-src="{{organ.attachment.url}}" border="0" />
<span><br><p>{{organ.name}}</p>
<small class="zero">quantidade de serviços : {{organ.services.length}}</small>
</span>
</a>
<br/>
<br/>
</div>
</div>
<div class="col-12">
<div class="col-4 ladolado" ng-repeat="organ in organs | orderBy: '+name'" ng-if="organ.attachment.url == null">
<a href="{{organ.url}}" class="decoracao section">
<img src="/assets/layout/missing1.png" border="0" /><span><br><p>{{organ.name}}</p>
<small class="zero">quantidade de serviços : {{organ.services.length}}</small></span>
</a>
<br/>
<br/>
</div>
</div>
</div>
$scope.choices = [{
name: "Crescente"
}, {
name: "Decrescente"
}];