Commit 9a4bd8fd authored by Sindre Sorhus's avatar Sindre Sorhus

Merge pull request #1113 from foam-framework/foam-fixes

Clean up FOAM implementation - stop reloading on route change, fix broken link
parents 480cf298 0a600221
......@@ -53,7 +53,7 @@
choiceToHTML: function (id, choice) {
var self = this;
this.setClass('selected', function () { return self.label === choice[1]; }, id);
return '<li><a id="' + id + '" class="choice" href="">' + choice[1] + '</a></li>';
return '<li><a id="' + id + '" class="choice" href="javascript:;">' + choice[1] + '</a></li>';
}
}
});
......@@ -148,10 +148,9 @@
function (memento) {
var s = memento && memento.substring(1);
var t = s ? s.capitalize() : 'All';
console.log('memento->label', memento, s, t);
return t;
},
function (label) { var s = '/' + label.toLowerCase(); console.log('label->memento', label, s); return s; });
function (label) { var s = '/' + label.toLowerCase(); console.log('label->memento', label, s); return s; });
this.addInitializer(function () {
$('new-todo').focus();
});
......
......@@ -45,4 +45,4 @@ To run the app, spin up an HTTP server and visit `http://localhost:8000/`.
## Credit
This TodoMVC implementation was created by the [FOAM team](https://github.com/orgs/foam-framework/members) at Google Waterloo.
This TodoMVC implementation was created by the [FOAM team](https://github.com/orgs/foam-framework/people) at Google Waterloo.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment