title: Click binding to parent function in foreach
body: <p>I have the following html:</p>
  
  <pre><code>&lt;div data-bind="foreach: Contacts"&gt;
     &lt;a data-bind="click: $parent.Foo($data), text: Name"&gt;link&lt;/a&gt;
  &lt;/div&gt;
  &lt;button data-bind="click: AddContacts"&gt;click&lt;/button&gt;
  </code></pre>
  
  <p>and js code:</p>
  
  <pre><code>var viewModel = ko.mapping.fromJS({"Selected":null,"Contacts":[]});
  viewModel.AddContacts = function(){
      this.Contacts([{"Name":"C1"},{"Name":"C2"}]);
  }
  
  viewModel.Foo = function (contact) {
      alert(contact.Name);
  }
  
  ko.applyBindings(viewModel);
  </code></pre>
  
  <p>When I click the button the Foo is called for each contact. I didn't expect this to be called at all until any of the link is clicked.</p>