Genie Discord forum

Author Avatarmi-ti
1/12/2024, 10:19:29 PM

I am using genie builder and and would like to add my javascript, there is a macro "@mounted", and after searching I also found @Pere has a answer that just put js file in public folder, but both not work, maybe it is a easy job, but I have no idea how to do it, and the document is not so good I think, so I searching some helps here ๐Ÿ˜„

currently I just put the script in app.jl.html,

my js code

it could work but Vue do not like this and complaint: Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <script>, as they will not be parsed.</script>

Author Avatarmi-ti
1/19/2024, 5:23:56 AM

great thanks!! will try this.