Get, set and delete JSON data from local storage
First, make sure you have the Polymer CLI and npm (packaged with Node.js) installed. Run npm install
to install your element's dependencies, then run polymer serve
to serve your element locally.
$ npm install blox-store
$ polymer serve
$ polymer test
$ import 'blox-store';
<blox-store
key="myApp"
value="{'name': 'Will'}"
operation="set">
</blox-store>
<blox-store id="bloxStore"></blox-store>
<script>
this.$.bloxStore.set('myApp', {'name': 'Will'})
.then((hash) => {
// Do Something
})
.catch((err) => {
// Do Something
})
</script>