How fix Error:
[$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object?
//
Also, if your service is sending an object instead of an array add isArray:false to its declaration.
'query': {method: 'GET', isArray: false }