Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added bindings.

  • Loading branch information...
commit de673ae95aa8c2dc92df50c4343b579c7e447971 1 parent 4bb9e46
Rishabh Rao authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 js/main.js
6 js/main.js
View
@@ -40,7 +40,11 @@ jQuery(document).ready(function() {
success: function(data, textStatus, jqXHR) {
console.log(data, textStatus, jqXHR);
- // TODO Apply bindings to self.items
+ // We want to clear any previous results
+ // so we can use KnockoutJS's convenience method removeAll()
+ self.items.removeAll();
+
+ // Apply bindings to self.items
jQuery.each(data.Similar.Results, function(index, value) {
var item = new ItemModel(value);
self.items.push(item);
Please sign in to comment.
Something went wrong with that request. Please try again.