title: knockout.js - Get ViewModel from DOM element
body: <p>is is possible to get the binded ViewModel JavaScript object from a given DOM element?</p>
  
  <pre><code>ko.applyBindings( gLoginViewModel, document.getElementById("login-form") );
  ko.applyBindings( gLoginViewModel, document.getElementById("register-form") );
  </code></pre>
  
  <p>and somewhere else - in rather unrelated code - something like this:</p>
  
  <pre><code>var viewModel = ko.getViewModel( formElement );
  viewModel.someObservable( someData ); // observable available in all ViewModels
  </code></pre>
  
  <p>it would even be better if I could do something like:</p>
  
  <pre><code>var viewModel = ko.getViewModel( someChildElement );
  </code></pre>