Permalink
Browse files

Knockout app - code style

  • Loading branch information...
1 parent c14b397 commit 705154dc79b1f0512cd9f05c759d6a687b6df642 @sindresorhus sindresorhus committed Mar 9, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 architecture-examples/knockoutjs/js/app.js
@@ -151,20 +151,20 @@
// internal computed observable that fires whenever anything changes in our todos
ko.computed(function () {
// store a clean copy to local storage, which also creates a dependency on the observableArray and all observables in each item
- localStorage.setItem('todos-knockout', ko.toJSON(self.todos));
+ localStorage.setItem('todos-knockoutjs', ko.toJSON(self.todos));
}).extend({
throttle: 500
}); // save at most twice per second
};
// check local storage for todos
- var todos = ko.utils.parseJson(localStorage.getItem('todos-knockout'));
+ var todos = ko.utils.parseJson(localStorage.getItem('todos-knockoutjs'));
// bind a new instance of our view model to the page
var viewModel = new ViewModel(todos || []);
ko.applyBindings(viewModel);
// set up filter routing
- /*jshint newcap:false*/
+ /*jshint newcap:false */
Router({'/:filter': viewModel.showMode}).init();
-}());
+})();

0 comments on commit 705154d

Please sign in to comment.