Call JavaScript module from Mustache template in Moodle 3.10

Re: Call JavaScript module from Mustache template in Moodle 3.10

by Richard Jones -
Number of replies: 0
Picture of Plugin developers Picture of Testers
Hi Gareth

Yes, that would likely work as does:

{{#js}}
    require(['block_es6/user_form'],
            function(user_form) {
                user_form.init('{{name}}');
            }
    );
{{/js}}
The issue was indeed the quotes around the string.

Thanks
Richard