Skip to content

Commit

Permalink
update todomvc
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Mar 23, 2014
1 parent cd53688 commit d5a0830
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/todomvc/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'use strict';

var filters = {
all: function (todo) {
all: function () {
return true;
},
active: function (todo) {
Expand All @@ -16,7 +16,7 @@
}
};

exports.app = new Vue({
var app = exports.app = new Vue({

// the root element that will be compiled
el: '#todoapp',
Expand Down
7 changes: 7 additions & 0 deletions examples/todomvc/js/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
});
});

router.configure({
notfound: function () {
window.location.hash = '';
app.filter = 'all';
}
});

router.init();

})(app, Router);

0 comments on commit d5a0830

Please sign in to comment.