Using a deferred in controller
advisorService.getData(searchObj)
// then() called when service gets back
.then(function (data) {
$scope.allAdvisors = data;
}, function (error) {
// promise rejected, could log the error with: console.log('error', error);
}
);