title: Unable to parse bindings. knockout error
body: <p>this is my day 2 learning Knockout.</p>
  
  <p>Trying to attach "deleteItem" for button click. it gives the following error.</p>
  
  <blockquote>
    <p>Error</p>
    
    <p>Uncaught Error: Unable to parse bindings.<br>
    Message: ReferenceError: deleteItem is not defined; Bindings value: click: deleteItem</p>
  </blockquote>
  
  <p>JavaScript:</p>
  
  <pre><code>$(function () {
      var defaultData = [{
          id: 1,
          item: "Todo 1"
      }, {
          id: 2,
          item: "Todo 2"
      }, {
          id: 3,
          item: "Todo 3"
      }];
      var viewModel = {
          listItem: ko.observableArray(defaultData),
          addItem: function () {
              // Add new item
              var id = this.listItem().length + 1;
              this.listItem.push({
                  id: id,
                  item: "Todo " + id
              });
          },
          deleteItem: function () {
              alert(this);
          }
      }
      ko.applyBindings(viewModel, main);
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div id="main"&gt;
      &lt;button data-bind="click: addItem"&gt;+ Add Item&lt;/button&gt;
      &lt;div data-bind="foreach: listItem"&gt;
          &lt;input type="text" data-bind="value: item" /&gt;
          &lt;input type="button" data-bind="click: deleteItem" /&gt;
          &lt;br /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>