As near as I can tell, when you view a Grid in Magento's backend, the following "loaded over XHR" KnockoutJS template is what starts rendering things
File: vendor/magento//module-ui/view/base/web/templates/collection.html
URL: http://magento.example.xom/pub/static/adminhtml/Magento/backend/en_US/Magento_Ui/templates/collection.html
<each args="data: elems, as: 'element'">
<render if="hasTemplate()"/>
</each>
However -- I'm at a bit of a loss as to what the <each/>
tag and the <render/>
tag are. They aren't (or don't appear to be?) a part of stock KnockoutJS.
I know its possible to add custom tags to KnockoutJS via components, but I don't see any obvious places where a component named each
or render
is added to KnockoutJS.
So, I'm not sure if these are components registered somewhere I'm not aware of, or some other customization that Magento has made to KnockoutJS that enables custom tags, or something else entirely.
Note: I'm not completely in the dark here -- I get that <each/>
is probably iterating over every child ui component rendered in the JSON, and rendering its template (if that template exists).
What I'm not clear on at all is how these tags are implemented. I want to see where they're implemented so I can debug how data is bound, and also understand the mechanism that Magento's using to create these tags in case there are others.