i have c# mvc web application , have started exploring use of angularjs make views cleaner.
i pass data retrieved model(sql database) angular scopes. angularjs examples have seen far passes data scope in json format:
example: $scope.contacts = [ {type:'phone', value:'408 555 1212'}, {type:'email', value:'john.smith@example.org'} ];
i know if it’s possible pass data controller view directly angular scope without using json format.
example controller returns following view.
public actionresult index() { var mymodel = mydatarepository.getdate(); return view(mymodel); }
how can pass view returned in above angular scope without using json?
Comments
Post a Comment