Skip to content

Commit

Permalink
Clean up FOAM implementation - stop reloading on route change, fix br…
Browse files Browse the repository at this point in the history
…oken link
  • Loading branch information
bshepherdson committed Feb 2, 2015
1 parent 480cf29 commit 0a60022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions examples/foam/Todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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>';
}
}
});
Expand Down Expand Up @@ -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();
});
Expand Down
2 changes: 1 addition & 1 deletion examples/foam/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

0 comments on commit 0a60022

Please sign in to comment.