I try to use $scope inside a factory to stock a value but i can't.
I try also to push the value into an array, it doesn't work.
I just want to copy a callback value into a variable to return it from a factory.
This is a sample :
var cpy = {};
$http.get('/api/things/')
.success(function (data){
cpy = data;
})
.error(function (err){
});
console.log(cpy);
Thanks for your help.