platform
platform copied to clipboard
dynamically Import widget manager
To use widget manager inside twig templates with loadModules its necessary to dynamically import it.
Example:
<script type="text/javascript">
loadModules(['oroui/js/widget-manager'],
function(widgetManager) {
widgetManager.getWidgetInstance({{ app.request.get('_wid')|json_encode|raw }}, function(widget) {
...
});
});
</script>
I can do it also by my own, but ATM there are so many dynamic-imports and I'm not quite sure why the widget manager is missing.
Thx.
Hi Eric, The enhancement makes sense. Thank you for your contribution. Internal ticket id BAP-21507.
@anyt any updates here? i've rebases the MR against the latest master
as it was published in 6644adbb745fb9c089e46b149698d24adeccc48d we can close here. thx @anyt :)
Happy Easter 🐣