I am trying to get page complete event in angularJs after complete rendering of template.
Here is the code which I tried:-
app.controller('Mycontroller',function($scope,$http,$stateParams,$sce,$timeout){    
var request = $http({       
        url:"/test.php",            
        headers: {'Content-Type' : 'application/x-www-form-urlencoded'}                     
    }); 
    request.success(function(data){                     
        $scope.testhtml = $sce.trustAsHtml(data);               
    });
    $scope.$on('$viewContentLoaded', function(event) {   
            $('#firstcontent').trigger('create'); 
            alert('fullyloaded');       // this alert I am getting before template rendering , (I want this alert after template rendering )
    }); 
});
 
     
     
    