Using javascript variables in x-magento init tags
0
The below code errors out unexpected token : <script>var myJSVariable = '';</script> <script type="text/x-magento-init"> { "*": { "js/async_templates": { "template_code": "rv", "selector" : "#rv-content", "isAjax" : "true", "product_id" : "<?php echo $this->getCurrentProduct()->getId() ?>", "rvp" : myJSVariable, } } } </script> I want to use myJSVariable value in the JSON. Is there a...