我尝试使用typescript中的ODataAngularResources调用OData v4服务。
出于测试目的,我使用Northwind Products OData Service
以下是致电服务的代码:
post
请求网址:http://services.odata.org/V4/Northwind/Northwind.svc/Products?$ filter =(UnitPrice%20gt%2010)%20和%20(停止%20eq%20true)& $ top = 2
回复:
$_SESSION
反序列化响应:
var results = this.$odataresource("http://services.odata.org/V4/Northwind/Northwind.svc/Products")
.odata()
.filter("UnitPrice", ">", 10)
.filter("Discontinued", true)
.take(2)
.query();
我想将反序列化的反序列化为Product对象的数组。
我真的不知道问题出在哪里。
在app中我使用ODataResources但也使用ngResource。