How To Pass Data From AngularJs Controller To HTML Page Script [Resolved]

Posted by Kasani007 under AngularJS 1x on 10/31/2016 | Points: 10 | Views : 1156 | Status : [Member] | Replies : 1
I Have AngularJS Controller, Which had $scope Object With Some data,i.e.,
Now I want to assign that data to Html page having script as below

 <script type="text/javascript">
var stdId=$scope.Student.StudentId;
var stdName=$scope.Student.StudentName;

thanks n regards,


Posted by: Kasani007 on: 11/1/2016 [Member] Starter | Points: 25


To Pass The $scope Object From A Controller To Outer Control, Then We Have To use

var scope = angular.element($("#OuterControlId")).scope();

The Outer Control May Be TextBox,Label Or ReportViewer Anything else..we can handle data with the above code from controller.

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response