In the main.php loaded the angular.js library and Have a ajax call to another php file second.php when a button is clicked on the page and the results are added to the div. In second.php file have the below code
echo '<table ng-app="testapp">' ;
echo '<tr>' ;
echo '<td ng-model="testaa"> hello world </td>' ;
echo '<td> {{testaa}} </td>';
echo '</tr>'
echo '</table>' ;
In Main.php file have the below and angularjs code and html div to display the value.
var mainApp=angular.module("cspApp" , []); mainApp.controller("cspController" , function($scope,$http,$sce) {
$scope.editfilterrules=function(){
$http({
method : "GET",
url : 'second.php'
}).then(function mySucces(response) {
// console.log(response.data);
$scope.filterrulesDivCon=$sce.trustAsHtml(response.data);
// $('#filterrulesDiv').html(response.data);
}, function myError(response) {
});
}
angular js is not firing to updated the model values after the ajax call is successfully completed. so it's showing as {{testaa}} How can I make the angular js to rerun after the DOM is updated.