I am trying to understand HotTowel more.
In ~/App/views/shell.html, it contains:
<header>
<!--ko compose: {view: 'nav'} --><!--/ko-->
</header>
Are ko
commands embedded within Html comment tags? If so, what does the compose command do and how is the argument used?
Yes. This is a feature of KnockoutJS and it's called "virtual elements". The main advantage is that you don't have to add additional HTML tags if it's unnecessary. It's very useful and it's very clean in some scenarios. Mentioned in few places in Knockout documentation i.e.: http://knockoutjs.com/documentation/with-binding.html and http://knockoutjs.com/documentation/custom-bindings-for-virtual-elements.html
As of
compose
it's a custom binding and is explained in HotTowel README: