how can I add script for Magento_Checkout/web/template/minicart/item/default.html
file? I have to add data-bind="click: {}"
to the product, but I don't know where I should place my function? I tried in minicart.js but it doesn't work.
Example.
<!-- ko if: product_has_url -->
<div data-bind="attr: {title: product_name}, event: { click: function() { customFunc() } }" tabindex="-1" class="product-item-photo">
</div>
<!-- /ko -->
I need to pass product data as a function parameter from this file, so it can't be global script.