title: Access viewModel in javascript function outside viewModel's scope
body: <p>I'm wondering if I can access the knockout.js main viewModel from a method outside the scope of the viewModel itself. Take this example:</p>
  
  <pre><code>function Employee(data) {
    var self = this;
    ko.mapping.fromJS(data, {}, this);
  }
  
  function EmployeeViewModel() {
    var self = this;
    this.employees = ko.observableArray([]);
  
    this.loadEmployees = function() {
      var mappedEmployees= $.map(JSON.parse(data.value), function(item) { return new Employee(item) });
      self.employees (mappedEmployees);
    }
  }
  
  // here's the part I'm curious about
  $(document).ready(function() {
    ko.applyBindings(new EmployeeViewModel());  
  
    $("#myLink").click(function() {
       // is there some way to get back into the ko context here?
       // like with ko.dataFor or ko.contextFor?
    });
  }
  </code></pre>