I have been checking out M2's frontend structure and I stumbled in some knockoutjs's template binding, for example in Magento/Checkout/view/frontend/web/template/shipping-address/form.html
(this file render the add new address popup form in Shipping page of checkout), we got:
<form class="form form-shipping-address" id="co-shipping-form" data-bind="attr: {'data-hasrequired': $t('* Required Fields')}">
<!-- ko foreach: getRegion('before-fields') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<div id="shipping-new-address-form" class="fieldset address">
<!-- ko foreach: getRegion('additional-fieldsets') -->
<!-- ko template: getTemplate() --><!-- /ko -->
<!--/ko-->
<!-- ko if: (isCustomerLoggedIn) -->
<div class="field choice" data-bind="visible: !isFormInline">
<input type="checkbox" class="checkbox" id="shipping-save-in-address-book" data-bind="checked: saveInAddressBook" />
<label class="label" for="shipping-save-in-address-book">
<span data-bind="i18n: 'Save in address book'"></span>
</label>
</div>
<!-- /ko -->
</div>
I understand the checkbox part, but not the <!-- ko template: getTemplate() --><!-- /ko -->
. I tried deleting one of those and the popup is empty. What is getTemplate()
exactly and where can I find the piece of code that it references to?