AngularJs radio does not get binded to scope
<p>I'm trying to pass the selected radio button to the scope and then to the server, but it's not passing. Here is my HTML code:</p>

<pre><code>&lt;div class="form-group"&gt;
          &lt;label class="control-label"&gt; What product?&lt;/label&gt;
            &lt;div ng-repeat="type in typeProducts | orderBy:'name'"&gt;
                &lt;input type="radio" ng-model="$parent.product_id" name="typeproduct" value="{{type.id}}"/&gt;
                &lt;label for="radio"&gt;{{type.name}}&lt;/label&gt;
            &lt;/div&gt;
        &lt;/div&gt;
</code></pre>

<p>Here is the controller:</p>

<pre><code>$scope.createProduct = function() {
      Account.createProduct($scope.product)
        .then(function() {
          toastr.success('Product has been created');
        })
        .catch(function(response) {
          toastr.error(response.data.message, response.status);
        });
    };
</code></pre>

<p>The error is on the server side, since the DB doesn't accept null columns</p>