title: parseInt return value from radio button AngularJS
body: <p>I've been trying to figure this out for a couple of days now...</p>
  
  <p>I've got a set of radio buttons to rate something between 1 and 5 with each set to value = 1, value = 2 and so on as part of a comment form.  But when the data is returned to the controller and is pushed to the db.json file, the radio button values are of type string.  How do I get them to be of type int?    </p>
  
  <p>Radio button HTML code:</p>
  
  <pre><code>&lt;label class = "radio-inline" for = "one"&gt;&lt;input type = "radio"
  name = "rating" id = "one" data-ng-model = "userComment.rating" 
  value = 1 required&gt;1&lt;/label&gt;
  </code></pre>
  
  <p>code from controllers.js:</p>
  
  <pre><code>$scope.submitComment = function() {
    $scope.movie.comments.push($scope.userComment);
    myFactory.getMovies().update({id:$scope.movie.id}, $scope.movie);
  </code></pre>
  
  <p>I tried this thinking it would work, but it didn't.</p>
  
  <pre><code>$scope.userComment.rating = parseInt($scope.userComment.rating);
  </code></pre>