title: Button to toggle on selecting a specific option from dropdown using AngularJs
body: <p>M stuck in Angular Js. I want to toggle the button between left and middle when I select a specific option from the dropdown.</p>
  
  <p>By default the button is at middle. I want to toggle it to left only when I select "one" from the dropdown and remain at middle for the rest of the options.</p>
  
  <p>This is the half baked code I have written
    (Index.html)</p>
  
  <pre><code>&lt;div ng-controller="ButtonsCtrl"&gt;
  
  &lt;h4&gt;Radio &amp;amp; Uncheckable Radio&lt;/h4&gt;
  &lt;select ng-model="selectedItem"&gt;
      &lt;option ng-repeat="item in items" value="{{item}}"&gt;{{item}}&lt;/option&gt;
    &lt;/select&gt;
  &lt;div class="btn-group"&gt;
      &lt;label class="btn btn-primary" ng-model="radioModel" btn-radio="'Left'"&gt;Left&lt;/label&gt;
      &lt;label class="btn btn-primary" ng-model="radioModel" btn-radio="'Middle'"&gt;Middle&lt;/label&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>The Js file is as follows:</p>
  
  <pre><code>angular.module('ui.bootstrap.demo', ['ngAnimate', 'ui.bootstrap']);
  angular.module('ui.bootstrap.demo').controller('ButtonsCtrl', function($scope){  $scope.radioModel = 'Middle';$scope.items = ['one','two','three','four'];});
  </code></pre>
  
  <p>Thanks in advance!!!</p>