main problem is not how to print something on the console. That works fine. 

I want to get the received json data into a variable that my controller can 
use further. 

Whatever i try, everything inside a function works correct inside the 
controller but outside this function i still end up with the stupid Object 
instead of a json array. 
.factory('jamboFactory',['$resource',function($resource){
            return $resource('customers.php', {}, {
              query: {method:'GET', isArray:false }
            });
}])

.controller('jamboCtrl', function($scope,jamboFactory) {
    var myTest=    jamboFactory.query(function(data){
        console.log(data.thedata); // output: JSON ARRAY!
        return data.thedata; // should return JSON ARRAY
    });
    console.log('myTest here is:'+myTest); // freaking Object

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to