Fetch data from any API and display it using data attributes with Galleon Attributes.
Updating data is my next mission to tackle.
Please let me know your thoughts as a reply or direct message ![]()
| Attribute | Purpose | Example |
|---|---|---|
gl-get |
Fetches JSON data from an endpoint | <div gl-get="/api/data.json"> |
gl-bind |
Binds element’s text content to a data property | <h1 gl-bind="title">Title</h1> |
gl-bind-[attr] |
Binds specific attributes to data properties | <img gl-bind-src="image.url"> |
gl-bind-html |
Binds element’s inner html content to a data property | <div gl-bind-html="content"> |
gl-iterate |
Iterates through array items | <li gl-iterate="items"> |
gl-auth-token |
Authentication source and key | <div gl-auth-token="local:userToken"> |
There is a quick guide on Galleon Attributes