using (Html.BeginForm("MyAction", "MyController", FormMethod.Post, new { model= myModel }))
{
}
I have $scope.myModel={}. i want to do form post this scope object like above MVC form.post. not ajax post. how to assign this scope object to MVC object?
What I have tried:
using (Html.BeginForm("MyAction", "MyController", FormMethod.Post, new { model= myModel }))
{
}
Angular code :
(function () {
"use strict";
angular
.module("app")
.controller("myCtrl", myCtrl);
myCtrl.$inject = ["$scope", "$location", "sroFactory", "sroCommonService"];
function ctCtrl($scope, $location, sroFactory, sroCommonService) {
$scope.myModel={};
}
}());