title: Knockout default text when `foreach` is empty
body: <p>Bearing in mind that <a href="https://stackoverflow.com/questions/10577078">similar questions have been answered here</a>, I was wondering how one might go about having default text or HTML display inside a Knockout <code>data-bind='foreach: list'</code> whenever the list is empty.</p>
  
  <p>The solutions on the linked page don't quite seem to line up with this, and in any case I thought of another way to try to accomplish this with a custom binding like this:</p>
  
  <pre><code>text.default = {
    update: function (element, valueAccessor) {
        var $e = $(element),
            obs = valueAccessor();
  
        function _check_blank() {
           // the element has content - so we do nothing
           if ($e.text().trim()) {
              return;
           }
           // the element is empty;
           $e.text("Default Text")
        }
        // we use setTimeout to ensure that any other bindings complete 
        // their update
        setTimeout(_check_blank, 0);
    }
  }
  </code></pre>
  
  <p>This seems to work reasonably well with simple observables but it does not work with the <code>foreach</code> binding, though in any case I think the <code>extender</code> suggestion in the above link is probably preferable for a few reasons -- the above code would have a number of caveats. Nevertheless, I threw this example in here because it somewhat highlights an alternative and food for thought.</p>
  
  <p>All that being said, I would like to know what options there might be for providing a default in lieu of <code>foreach</code> content.</p>
  
  <p>One is to provide a wrapper in a simple <code>if</code>, like this:</p>
  
  <pre><code>&lt;!-- ko if: xyz().length --&gt;
     // foreach
  &lt;!-- /ko --&gt;
  &lt;!-- ifnot: xyz().length --&gt;
     // default text
  &lt;!-- /ko --&gt;
  </code></pre>
  
  <p>However this is not particularly elegant -- lots of code clutter.</p>