Thiruppathi R

Thiruppathi R

  • 239
  • 7.3k
  • 2.3m

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)