Skip to content

Commit d5a0830

Browse files
committed
update todomvc
1 parent cd53688 commit d5a0830

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

examples/todomvc/js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'use strict';
66

77
var filters = {
8-
all: function (todo) {
8+
all: function () {
99
return true;
1010
},
1111
active: function (todo) {
@@ -16,7 +16,7 @@
1616
}
1717
};
1818

19-
exports.app = new Vue({
19+
var app = exports.app = new Vue({
2020

2121
// the root element that will be compiled
2222
el: '#todoapp',

examples/todomvc/js/routes.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
});
1313
});
1414

15+
router.configure({
16+
notfound: function () {
17+
window.location.hash = '';
18+
app.filter = 'all';
19+
}
20+
});
21+
1522
router.init();
1623

1724
})(app, Router);

0 commit comments

Comments
 (0)