【发布时间】:2017-02-03 10:31:24
【问题描述】:
在 HATEOAS 链接的支持下,我有一个安静的网络服务。当我打电话 "http://localhost:8080/v1/bookings/1225380?lock=true" 链接我得到了以下资源 URL。我想将这些超媒体与我的 Angular2 应用程序(最近升级到最终版本)集成。我发现在 Angular HAL 的支持下使用 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 的资源。
"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"
}
]
【问题讨论】: