here is my code
var object = null
app.controller("controller",function($scope,service){
$scope.search=function(){
service.findData().then(
function successCallback(response){
object = response.data
},
function errorCallback(response){
alert("error")
}
)
console.log(object)
}
})
when I print the object, it is null so the question is: how can I get response.data outside?
Thank you for helping!