getTopicContent.request().finally(function(){
$scope.loader= false;
}).then(function(response){
$scope.threadContent = response.data;
})
$scope.loadPages = function($scope) {
console.log($scope.threadContent.totalPages);
}
It returned threadContent of undefined. getTopicContent is the service, but I expect $scope.threadContent can be shared with $scope.loadPages function?