4
我有一個HATEOAS鏈接支持的寧靜Web服務。當我撥打 「http://localhost:8080/v1/bookings/1225380?lock=true」 鏈接時,我獲得了以下資源URL。我想將這些超媒體與我的Angular2應用程序(最近升級到最終版本)相集成。我發現在Angular1的支持下,Angular1實現了很少的資源(鏈接 - https://paulcwarren.wordpress.com/2015/04/03/role-based-spas-with-angularjs-and-spring-hateoas/,https://github.com/LuvDaSun/angular-hal/tree/master/src)。但是我無法找到Angular2的資源。使用HATEOAS支持Angular2
"links": [
{
"rel": "client",
"href": "http://localhost:8080/v1/clients/10000"
},
{
"rel": "passengers",
"href": "http://localhost:8080/v1/bookings/1225380/passengers"
},
{
"rel": "itinerary",
"href": "http://localhost:8080/v1/bookings/1225380/itinerary"
},
{
"rel": "self",
"href": "http://localhost:8080/v1/bookings/1225380?lock=true"
},
{
"rel": "clientBookingHistory",
"href": "http://localhost:8080/v1/bookings/1225380/clientBookingHistory/10000"
}
]