/hateoas-ajax

An extension of polymer's core-ajax but with an addition of some magic related to hateoas.

Primary LanguageJavaScript

hateoas-ajax Build Status

An extension of polymer's iron-ajax but with an addition of some magic related to hateoas.

setup

<!-- replace core-ajax with hateoas-ajax -->
<hateoas-ajax url="{{url}}" response="{{response}}"></hateoas-ajax>

perform get

{
  "name": "Max",
  "_links": {
    "address": {
      "href": "[request url]"
    }
  }
}
<!-- simply call relations like they are properties -->
<!-- they are requested and though data binding automatically displayed when present -->
<div>{{person.address}}</div>

Documentation

component page