Skip to content

Commit

Permalink
todomvc example: pre-initialize state before mounting app
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jul 14, 2016
1 parent c1d8ccb commit b8c3b5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion examples/todomvc/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
height: 60px;
}
.todo-move, .todo-enter-active, .todo-leave-active {
transition: all .25s cubic-bezier(.55,0,.1,1);
transition: all .25s cubic-bezier(.5,0,.1,1);
}
.todo-enter, .todo-leave-active {
opacity: 0;
Expand Down Expand Up @@ -94,6 +94,9 @@ <h1>todos</h1>
<script>metrics.beforeRender = now()</script>
<script src="js/app.js"></script>
<script src="js/routes.js"></script>
<script>
app.$mount('.todoapp')
</script>
<script>metrics.afterRender = now()</script>
<script src="perf.js"></script>
</body>
Expand Down
4 changes: 0 additions & 4 deletions examples/todomvc/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
};

exports.app = new Vue({

// the root element that will be compiled
el: '.todoapp',

// app initial state
data: {
todos: todoStorage.fetch(),
Expand Down

0 comments on commit b8c3b5a

Please sign in to comment.