Can I create non-empty Knockout components that use the child markup within them?
An example would be a component for displaying a modal dialog, such as:
<modal-dialog>
<h1>Are you sure you want to quit?</h1>
<p>All unsaved changes will be lost</p>
</modal-dialog>
Which together with the component template:
<div class="modal">
<header>
<button>X</button>
</header>
<section>
<!-- component child content somehow goes here -->
</section>
<footer>
<button>Cancel</button>
<button>Confirm</button>
</footer>
</div>
Outputs:
<div class="modal">
<header>
<button>X</button>
</header>
<section>
<h1>Are you sure you want to quit?</h1>
<p>All unsaved changes will be lost</p>
</section>
<footer>
<button>Cancel</button>
<button>Confirm</button>
</footer>
</div>