This is my controller:
ProductsFactory.getOneProduct().then(function(d){
$scope.selectedProduct = d.data;
console.log($scope.selectedProduct); //Working
});
console.log($scope.selectedProduct); //Undefined
I can access the data from within the function. But not from outside. This means I cant use the data in my GUI. How do I make access from outside?
Update Apperently it is working in the GUI. But you can not console anything outside.