Custom Element to bind server-side view models with HTML nodes (HTML Templates/Web Components/AngularJs Apps) using PuppetJS communication (JSON-Patch)
Install the component using Bower:
$ bower install puppet-js --saveOr download as ZIP.
-
Import Web Components' polyfill:
<script src="bower_components/platform/platform.js"></script>
-
Import Custom Element:
<link rel="import" href="bower_components/puppet-js/src/puppet-js.html">
-
Start using it!
<puppet-js ref="nodeToBind"></puppet-js>
| Attribute | Options | Default | Description |
|---|---|---|---|
ref |
String | (required) Id or object reference to DOM Element to bind with server | |
serverURL |
String | window.location.href |
Data (view model) server URL |
ignoreAdd |
String | undefined |
Regular expression with local properties to ignore (see PuppetJS.ignoreAdd). Should be given in string format, like "_.+". |
useWebSocket |
String | false |
Upgrade communication protocol to WebSocket (see PuppetJS.useWebSocket) |
<puppet-js> inherits from Puppet so take a look at PuppetJs API.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature - Commit your changes:
git commit -m 'Add some feature' - Push to the branch:
git push origin my-new-feature - Submit a pull request :D
For detailed changelog, check Releases.
MIT