I am working on app and I've used angular.js and bootstrap.I've a page in which i used modal popup. in this popup I've item list, each item have a button.My problem is when i click on button my scope is getting null.
$scope.user='UserName';
$scope.openList=function(){
$('#poplist').modal('show')
}
$scope.getUser=function(){
console.log('username are ' + $scope.user); // here i am getting $scope.user is null
}
Html pages
<div id="poplist" class="modal fade">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title">MyList</h4>
</div>
<div class="modal-body">
<div>
<table class="paper-table">
<tbody>
<tr>
<th>List Name</th>
<th>Total Candidate</th>
<th>Action</th>
</tr>
<tr ng-repeat="p in MyListTable.Rows" class="cp">
<td>{{p.ListName}}</td>
<td>0</td>
<td><input type="button" ng-click="getUser()" class="btn btn-primary" value="Add To List" /></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
$scope.getUser function is call on button click in modal popup. $scop.user is outside of modal popup. Any help would be great . thanks