Data Sources - PageAmp/pageamp GitHub Wiki
PageAmp adds a simple formal representation of dynamic data to plain HTML with the <:datasource>
tag.
A data source can either be static or dynamic. A static one includes its own data from the start:
<:datasource :aka="people">
[
{"name":"Ann", "role":"Admin"},
{"name":"Joe", "role":"Account"}
]
</:datasource>
A dynamic data source will request data on demand, e.g.:
<:datasource :aka="people" :url="/api/people"/>
Data sources can be accessed by name in data attributes, e.g.:
<div :data=[[people]]>
<div>Name: [[data.name]]</div>
<div>Role: [[data.role]]</div>
</div>
A dynamic data source can also be a synthetic one.
TBD
Default: "application/json"