Created
September 14, 2012 17:29
-
-
Save pennyfx/3723388 to your computer and use it in GitHub Desktop.
x-indexDb scraps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Persistence and databinding tag thoughts | |
// | |
// Add one of these for each entity you want indexDb persistence | |
<x-indexdb for="x-todo-item" path="todoapp.todo-item"> | |
<x-indexdb for="x-user-preferences" path="todoapp.preferences"> | |
//when injected into the DOM will auto request data and inflate | |
<x-todo-item data-id="1"> | |
// another possibility is to define schema and validators | |
<x-indexdb for="x-todo-item" path="todoapp.todo-item" schema="TBD" validation="TBD"> | |
<x-validator type="length" min-length="0" max-length="120" /> | |
<x-validator type="number" /> | |
// How about a RESTful storage persistence provider? | |
// you give it a resource route and it issues GET/POST/PUT/DELETE ajax actions to your webserver | |
<x-restserver for="x-todo-item" path="/todo/"> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment