Here is my code,
$scope.output=abc(1,2);
function abc(mid, type) {
$http({
...
}
}).then(function (response) {
return response.data;
}, function (response) {
});
}
console.log($scope.output)
$scope.output
is
undefined
Function is executing but data is not assigning to $scope variable