javascript - AngularJS not linking with MVC Model -
we building form within ng-repeat tag. ng-model not seem linking mvc control model.
<li ng-repeat="item in favourites"> <form ng-submit="delete()" id="frmspec"> <input ng-model="item.description"/> <input ng-model="item.refno"/> <button type="submit"class="btn">{{item.description}} <span class="glyphicon glyphicon-remove"></span></button> </form> </li> <script type="text/javascript"> $scope.delete = function () { var url = '/list/deletefavourites/'; $http.post(url, $scope.formdata) .success(function (data) { }); };</script>
within mvc controller
public actionresult deletefavourites(models.mymodel mm, string buttontype) { }
this issue mm being returned null
any appreciated.
Comments
Post a Comment