title: Angular $watch <button> value
body: <p>I have two buttons, acting like radio group. Basically : if I click on a button, it is active and its value is watched by Angular $.watch().</p>
  
  <p>I did it with real radio buttons : </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form id="switch-view"&gt;
                     &lt;div class="radio-inline"&gt;
                        &lt;label&gt;
                          &lt;input type="radio" ng-model="srcUrl" name="optionsRadios" id="optionsRadios1" value="/me/has" checked="" &gt;
                          Label 1
                        &lt;/label&gt;
                      &lt;/div&gt;
                      &lt;div class="radio-inline"&gt;
                        &lt;label&gt;
                          &lt;input type="radio" ng-model="srcUrl" name="optionsRadios" id="optionsRadios2" value="/me/wants"&gt;
                          Label 2
                        &lt;/label&gt;
                      &lt;/div&gt;
                  &lt;/form&gt;
  </code></pre>
  
  <p>Angular :</p>
  
  <pre><code>$scope.$watch('srcUrl', function () {
      console.log($scope.srcUrl);
     $http({
          method: 'GET',
          url:  $scope.srcUrl,
          headers: {
          'Accept': 'application/json'
          }
     }).then(function(res){
          $scope.items = angular.fromJson(res.data)
              .sort($scope.SortByName)
              .map(function(e){
                  e.image = $sce.trustAsHtml(e.image);
                  return e;
              });
          $scope.newItems = $scope.items;
          if($scope.newItems.length === 0) {
              $scope.message = "";
          }
          //console.log($scope.items);
          $scope.checkPagination();
      });
  }); 
  </code></pre>
  
  <p>The code above works as expected. Now I want this to work with the following HTML :</p>
  
  <pre><code> &lt;form id="switch-view"&gt;
                     &lt;button class="btn btn-primary active" id="dash-btn-collection" ng-model="srcUrl" value="/me/has"&gt;Label 1&lt;/button&gt;
                     &lt;button class="btn btn-primary violet" id="dash-btn-wantlist" ng-model="srcUrl" value="/me/wants"&gt;Label 2&lt;/button&gt;
  
                  &lt;/form&gt;
  </code></pre>
  
  <p>Any ideas ?</p>