I have a web service controller that serves up "activity" data
GET /api/activity/list
GET /api/activity/1
GET /api/activity/activity-slug-name
PUT /api/activity
DELETE /api/activity/1
It also serves up some "meta" data
GET /api/activity/meta/dates
GET /api/activity/meta/states
They all work extremely well using ngResource as they all return JSON objects. However the /api/activity/meta/dates does not
It returns an array of strings
[
"2013-06-02T17:05:16Z",
"2013-06-07T17:05:16Z",
"2013-08-17T17:05:16Z"
]
ngResource turns this into an array of char arrays see: Invalid result from ngResource request with string array
Obviously i could just split the meta functions out into some form of ActivityMetaService but i would prefer to keep it all together
My question is
Is there a way to stop ngResource from performing this overzealous object decomposition?
Or should i rais a bug with angular?
Thanks in advance
* UPDATE *
Thanks Mark for your comment. If you had placed it as an answer I would have accepted it, because it points to a bug in Angular and the other two answers do not fit with the current architecture.
While you are technical correct, no one has though of Strings as an array of chars since the mid 80s, C/C++ programmers aside :)
I have raised a ticket on github with the angular.js project, reference below