I am using angular routers
app.config(function($routeProvider){
$routeProvider
.when('/comment/list',{
templateUrl: 'commentList.htm',
controller: 'mainController'
})
});
<td ng-show="btnUADetails" ng-click="loadPage('commentList', x.userName);">
<a class="detailButton" href="#/comment/list"></a>
</td>
and here is my angular function
$scope.loadPage = function(pageId, id) {
if(pageId == "commentList")
{
$scope.getServerData($scope.generateUrl(pageId, 'json', id)).then(function(result){
$scope.serverComment=result;
});
}
else{
//do something
}
}
Before $HTTP returns response html page loads and i am getting clean data in html table . Can i load this page after my functions returns result ? Or load html file first and load it again when functions returns result ?