title: knockoutjs nested views dynamically loaded
body: <p>is there something like knockout.refresh bindings?</p>
  
  <p>I am attempting to have a main.htm, myview.htm</p>
  
  <p>main.htm has a pageviewmodel with a observable currentviewmodel.</p>
  
  <p>main.htm:</p>
  
  <pre><code>&lt;div id="page"&gt;
     &lt;div data-bind="html:CurrentViewModel().Render"&gt; &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>with a script block</p>
  
  <pre><code>  var appViewModel = function(){
         var self = this;
         self.CurrentViewModel = ko.observable({Render:function(){return '';}});
         return self;
      };
      var myViewModel = function(){
         var self = this;
         self.Render = ko.observable('');
         self.Name = ko.observable('blah');
         self.Load = function(){
            $.get('views/myview.htm', function(data) {
               var res = data;
               self.Render(res);
               self.Name('blldjkfa');
            },"html");
         };
         return self;
      };
  </code></pre>
  
  <p>var pagemodel = new appViewModel();
  ko.applyBindings(pagemodel,$('#page')[0]);</p>
  
  <p>myView.htm:</p>
  
  <pre><code>&lt;div&gt;
  hello world &lt;span data-bind="text:Name"&gt;a&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>at some point the current view model gets set </p>
  
  <pre><code>var loadedModel = new mainViewModel();
  pagemodel.CurrentViewModel(loadedModel);
  loadedModel.Load();
  </code></pre>
  
  <p>when load gets called the html of the site is populated but the data-bind is not applied.
  however if i put a span with the same a into the block it does display the data from the new view model.</p>
  
  <p>...Leading me to believe that i need to refresh the binding somehow... that or set html differently?</p>