Magento 2 how to get mage-init data in my custom JS
I have this code in my.phtml:
<script type="text/x-magento-init"> { "*": { "installment": <?= $block->getConfig(); ?> } } </script>
I want to get the “parcel” data in my custom Js on the checkout page. How can I get?
When mage-init initializes my widget’s _create it returns with the filled data.
When I call requirejs it comes with empty data.
define( [ 'ko', 'installation' ], function (ko, installment) {
help