I have created a table like this.
<table>
<tr>
<th>Name<th>
<th>Dept<th>
<th>Num<th>
</tr>
<tr onclick="detail('xyz','1')">
<td>abc</td>
<td>xyz</td>
<td>1</td>
</tr>
</table>
<div id='content'></div>
While onclick ajax page will be called
function detail(dept,no){
$.ajax({
url:"det.php?dept="+dept+"&no="+no,
success:function(data){
$.getScript("../bootstrap/js/user_det.js");
document.getElementById('content').innerHTML=data;
}
});
In det.php page the user_det.js will be created dynamically according to the parameter passed.
<script src='bootstrap/js/user_det.js'> </script>
<div ng-app="myApp" ng-controller="MyController">
<div ng-repeat = "val in sample_det">
<div>{{val.dept}}</div>
<div>{{val.id}}</div>
<div>{{val.date}}</div>
</div>
</div>
If I run det.php page separately angularjs page running perfectly,But ajax success function the page is not loaded properly. So I need some solution to load angularjs page in ajax.