Skip to content

Instantly share code, notes, and snippets.

@michaelsbradleyjr
Last active December 20, 2015 23:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelsbradleyjr/6214902 to your computer and use it in GitHub Desktop.
Save michaelsbradleyjr/6214902 to your computer and use it in GitHub Desktop.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ply • TodoMVC</title>
<link rel="stylesheet" href="app/app.css">
<link rel="import" href="../../ply-comp/">
<link rel="import" href="ply-todos/">
<link rel="import" href="ply-todos/ply-todos-clear/">
<link rel="import" href="ply-todos/ply-todos-count/">
<link rel="import" href="ply-todos/ply-todos-input/">
<link rel="import" href="ply-todos/ply-todos-list/">
<link rel="import" href="ply-todos/ply-todos-selector/">
<link rel="import" href="ply-todos/ply-todos-toggle/">
<!-- <script src="bower_components/polymer/polymer.min.js"></script> -->
<script src="../../polymer-all/polymer/polymer.js"></script>
</head>
<body>
<header>
<h1>todos</h1>
</header>
<ply-model model="Ply • TodoMVC"
modelSeed='[
{ "title": "buy milk", "completed": false, "id": "1" },
{ "title": "annotate cats", "completed": false, "id": "2" },
{ "title": "hack with Google Polymer", "completed": false, "id": "3" }
]'
modelStorage="localStorage">
<ply-todos modelUse="Ply • TodoMVC"
modelUseKeys="^:todos"
model="todos-controller"
modelKeys="data,
@:todos,
selected:route"
modelSeed='{
"active" : [],
"completed" : [],
"filtered" : [],
"selected" : "all",
"todos" : null
}'
modelStorage="memory"
router>
<section>
<header>
<ply-todos-input></ply-todos-input>
</header>
<section>
<ply-todos-toggle modelUse="todos-controller"
modelUseKeys="todos.length:all,
completed.length:completed">
</ply-todos-toggle>
<ply-todos-list modelUse="todos-controller"
modelUseKeys="@:filtered">
</ply-todos-list>
</section>
<footer>
<ply-todos-count modelUse="todos-controller"
modelUseKeys="active.length:active">
</ply-todos-count>
<ply-todos-selector modelUse="todos-controller"
modelUseKeys="@:selected">
</ply-todos-selector>
<ply-todos-clear modelUse="todos-controller"
modelUseKeys="completed.length:completed">
</ply-todos-clear>
</footer>
</section>
</ply-todos>
</ply-model>
<footer id="info">
<p>Double-click to edit a todo</p>
<p>Created by <a href="https://github.com/projexsys/Ply">The Ply Authors</a></p>
<p>Part of <a href="http://todomvc.com">TodoMVC</a></p>
</footer>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment