title: Angular JS - display select option based on boolean value of dropdown
body: <p>Can we display alias name in the select options of dropdown using Angular JS</p>
  
  <p>Issue :</p>
  
  <p>Trying change Boolean value true to Ascending and false to Descending in the display of dropdown options and also trying to retain boolean value on selection of alias name - Ascending or Descending</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;html&gt;
  &lt;script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"&gt;&lt;/script&gt;
  &lt;body&gt;
  
  &lt;div ng-app="myApp" ng-controller="myCtrl"&gt;
  Trying to show dropdown options Ascending or Descending instead of true or false&lt;br&gt;&lt;br&gt;
  &lt;select ng-model="selectedName" ng-options="x.ascending for x in names"&gt;
  &lt;/select&gt;&lt;br&gt;&lt;br&gt;
  {{selectedName}}
  &lt;/div&gt;
  
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>var app = angular.module('myApp', []);
  app.controller('myCtrl', function($scope) {
      $scope.names = [{"name":"xxxx","ascending":true},{"name":"yyyy","ascending":false}];
  });
  </code></pre>
  
  <p><a href="http://codepen.io/nagasai/pen/ZBMLep" rel="nofollow noreferrer">http://codepen.io/nagasai/pen/ZBMLep</a></p>