0
我是新來restangular,並試圖將其整合到我的應用程序。以下是我迄今所做的:restangular得到完整的JSON響應
MyResource.getList(params).then((dt) ->
console.log dt
)
如果我使用$http.get
然後我得到我的全力JSON對象
{
"param" : "a",
"param2" : "b",
"data": [
{
"id": 6,
"name": "v1",
"address": "some long address"
},
{
"id": 8,
"name": "vadsf",
"address": "some long address again"
},
{
"id": 13,
"name": "asdf",
"address": "another long address"
}
]
}
但restangular,我得到如下:
[
{
"id": 6,
"name": "v1",
"address": "some long address"
},
{
"id": 8,
"name": "vadsf",
"address": "some long address again"
},
{
"id": 13,
"name": "asdf",
"address": "another long address"
}
]
我如何獲得完整的json而不是隻有數據數組?