title: Accessing data from containing view model
body: <p>You knew it had been quiet for too long, right? ;-)</p>
  
  <p>I have a master viewmodel. Inside the view, I use a compose binding to load a sub view which is "stand alone" as far as what data it displays goes.</p>
  
  <pre><code>&lt;div data-bind="compose: articleSection"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>And "articleSection" is just an observable containing a string:</p>
  
  <pre><code>var articleSection = ko.observable('viewmodels/lt_articleRead');
  </code></pre>
  
  <p>...because depending on user actions, I may want a different view/model loaded in that div.</p>
  
  <p>In my master viewmodel I also have an observable "articleSelected":</p>
  
  <pre><code>var articleSelected = ko.observable(true);
  </code></pre>
  
  <p>...which is set when an article is selected from list.</p>
  
  <p>Inside my sub view (lt_ArticleRead) I have two divs which can display. One if articleSelected is false and one if true:</p>
  
  <pre><code>&lt;div id="articleSelected" data-bind="visible: articleSelected()"&gt;
  ...
  &lt;/div&gt;
  &lt;div id="articleNotSelected" data-bind="visible: articleSelected()"&gt;
       &lt;p&gt;Please select an article from the list on the left or create a new one&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I've tried using "$root.articleSelected()" and "$parent.articleSelected" to access the observable from the main viewmodel but neither works.  Do I have to "require" the parent viewmodel in the subview for this to work properly?</p>