我深深地陷入了另一個angularJS學習山谷。我試圖在我們的C#.net環境中工作的掠奪者獲得RestAngular現場演示。當我到達這條線時:試圖將我的webservice連接到PLANK上的RestAngular現場演示
$scope.projects = Restangular.all("projects").getList().$object;
我在響應正文中得到了這個結果。
[ { "_id" : { "id" : 13} , "name" : "choiceBro" , "description" : "devils" , "site" : "https://www.google.co.uk/" , "id" : "923856329485632"} ,
{ "_id" : { "id" : 14} , "name" : "TESTING2" , "description" : "435q1gfdgfdgsda" , "site" : "http://www.567567.try"} ,
{ "_id" : { "id" : 15} , "name" : "Updated" , "description" : "435q1gfdgfdgsda" , "site" : "http://www.567567.try"} ,...
當我打我的web服務:
$scope.projects = Restangular.all("projects").getList().$object;
我得到這個早在響應體:
[{"id":1,"description":"All information everywhere","name":"Google","site":"http://Google.com","CreateId":"CRGA","CreateTimestamp":"\/Date(1445003454083)\/","ModifyId":"*Load*","ModifyTimestamp":"\/Date(1445003454083)\/"} ,
{"id":2,"description":"All things Microsoft","name":"Microsoft","site":"http://Microsoft.com","CreateId":"CRGA","CreateTimestamp":"\/Date(1445003454083)\/","ModifyId":"*Load*","ModifyTimestamp":"\/Date(1445003454083)\/"} ,
{"id":3,"description":"All things Strle","name":"Strle","site":"http://Strle.com","CreateId":"CRGA","CreateTimestamp":"\/Date(1445003454083)\/","ModifyId":"*Load*","ModifyTimestamp":"\/Date(1445003454083)\/"}]
我的對象是回來與名稱,地點,描述。我預計這足以呈現網頁 - 但事實並非如此。我注意到所有示例對象中的{ "_id" : { "id" : 99}
。那是對我有用的嗎?如果是,那是幹什麼的?
感謝您花時間添加該提示Xceno。 –