title: Angularjs radio button value used in api link
body: <p>I want to use the value of a radio button and implement that into an api link but its not linking for some reason.</p>
  
  <p><strong>heres my code</strong></p>
  
  <p><strong>JS</strong></p>
  
  <pre><code>myApp.controller('HomeController', ['$scope', '$http',
      function($scope, $http) {
  
          $scope.formData = {};
          $scope.doIt = function() {
              $scope.targetURL = ('https://api.api/' + $scope.formData + '/us/profile');
  
              $http.get($scope.targetURL)
                  .success(function(results) {
                      $scope.data = results.data;
                  });
          };
      }
  ]);
  </code></pre>
  
  <p><strong>HTML</strong> </p>
  
  <pre><code>&lt;div class="container-fluid"&gt;
   &lt;div class="background"&gt;
     &lt;div class="transbox"&gt;
        &lt;div class="row"&gt;
           &lt;div class="col-lg-4"&gt;
           &lt;/div&gt;
           &lt;div class="col-lg-3"&gt;
              &lt;label&gt;&lt;input type="radio" name='radio' value="pc" ng-model="formData"&gt;&lt;img src="../img/battlenet.png"&gt;&lt;/label&gt;
              &lt;label&gt;&lt;input type="radio" name='radio' value="psn" ng-model="formData"&gt;&lt;img src="../img/playstation.png"&gt;&lt;/label&gt;
           &lt;/div&gt;
           &lt;div class="col-lg-5"&gt;
           &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="row"&gt;
           &lt;div class="col-lg-9"&gt;
              &lt;input class="form-control" type="text" placeholder="Enter Gamertag"&gt;
           &lt;/div&gt;
           &lt;div class="col-lg-3"&gt;
              &lt;button type="submit" class="btn btn-default" ng-click="doIt()"&gt; Submit &lt;/button&gt;
           &lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>