Click here to Skip to main content
15,882,811 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 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";
.controller("myCtrl", myCtrl);

myCtrl.$inject = ["$scope", "$location", "sroFactory", "sroCommonService"];

function ctCtrl($scope, $location, sroFactory, sroCommonService) {
Updated 29-Oct-18 10:12am

1 solution

Things will get complicated when you try to mix two UI frameworks. Angular is a SPA UI framework, MVC is not. If you are aiming for SPA then you would typically couple that with AJAX to communicate with your data.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900