Thiruppathi R

Thiruppathi R

  • NA
  • 8.7k
  • 369k

MVC with AngularJS Using Strongly Typed

Apr 29 2016 4:47 AM
   Usually MVC (asp.net) Json return Value assign to angularJS $scope.
      But I need MVC Model variable directly  use Like $scope .
 
app.controller('ConsultantPersonalInformationController', 
function($scope, $filter, $http)
{
   $scope
.user = {
               id
: 1,
               firstName
: @Model.UserBaseViewModel.FirstName,
               lastName
: @Model.UserBaseViewModel.LastName };
});
 
 
Any one help me
 

Answers (3)