I have created admin form using uiComponent. I have called phtml file using <htmlContent name="html_content">
in xml file. I tired to call custom.js using below code but its not working.
<script type="text/x-magento-init">
{
"*": {
"Namespace_Module/js/custom": {
"Data": <?= /* @noEscape */ json_encode($data, JSON_HEX_QUOT) ?>,
"isSortable": <?= (int)(!$block->getReadOnly()) ?>,
"isReadOnly": <?= (int)$block->getReadOnly() ?>
}
}
}
</script>
This code is working fine if I call it using simple block method without uiComponent.
Please let me know how can I use my custom js file with uiComponent form.