I am working on a webapp that uses ngResource to fetch backend data. Here is my factory
App.factory('MyCoolResource', ['$resource', function($resource) {
'use strict';
return $resource('/rest/MyCoolResource');
}]);
Then in a Controller
console.log("Query: " + MyCoolResource.query())
In Chrome network inspector I can see the data coming back (an array of String)
["Foo","Bar","Gaz","Waka"]
But the console logging shows nothing:
Query:
What am I doing wrong here?