Skip to content

Instantly share code, notes, and snippets.

@adriank
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adriank/5548bbef121c6aeb33c5 to your computer and use it in GitHub Desktop.
Save adriank/5548bbef121c6aeb33c5 to your computer and use it in GitHub Desktop.
Asyncode HTML5 Link extensions
<!--
This is the default file visible at <your-project-name>.asyncode.com/
File location: <your-project-folder>/frontend/fragments/default.html
-->
<div id="myPart">Nothing here yet!</div>
<a href="/hello" ac-target="#myPart" ac-datasource="/myData">Load hello</a>
<!--
The HTML fragment file.
File location: <your-project-folder>/frontend/fragments/hello.html
-->
<p>Hello {{!.name}}</p>
<?xml version="1.0" encoding="UTF-8"?>
<view xmlns="http://asyncode.com/View">
<!--
The simple back-end file returning JSON document:
{"name":"World"}
File location: <your-project-folder>/api/myData.xml
-->
<node name="name">World</node>
</view>
<!--
After user clicks on the link the contents of <div id="myPart"> changes to this.
-->
<div id="myPart">Hello World!</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment