title: Perform orderBy when dropdown is selected angularjs
body: <p>I have a drop down list consisting of name and address. if name is selected then my list should be sorted with name.
  My code is not working properly` Order By</p>
  
  <pre><code>&lt;div class="col-xs-2"&gt;
          &lt;select class="form-control" ng-change="changedvalue()" ng-model="Tosort.order"&gt;
              &lt;option value="None"&gt;-- Select --&lt;/option&gt;
              &lt;option ng-model="Tosort.order" value="Name"&gt;Name&lt;/option&gt;
              &lt;option ng-model="Tosort.order" value="Address"&gt;Address&lt;/option&gt;
          &lt;/select&gt;
      &lt;/div&gt;
  &lt;li ng-repeat="x in details | filter: Tofilter.country | orderBy:sort.value"&gt;
  </code></pre>