1

Example Code:

<script type="text/javascript" src="https://widget.freshworks.com/widgets/<widget_id>.js" async defer></script>

I want to add to Quasar Framework and use the js in Vue. Any idea to add? Example I want to add inside this script in Quasar:

<script>
export default {
   
}
</script>
TSW
  • 41
  • 7

2 Answers2

0
<script type="text/javascript" :src="'https://widget.freshworks.com/widgets/' + widget_id + '.js'" async defer/>
  • 1
    It would be helpful if you provide some context and explanation of your solution, rather than just a code fragment. You are more likely to get upvoted if people understand why your solution is good. – Dragonthoughts Nov 08 '22 at 13:18
-1

I had the same issue. In my case I added the script to my component via the mounted method.

let widgetScript = document.createElement('script')
widgetScript.setAttribute('src', 'https://widget.freshworks.com/widgets/') 
document.head.appendChild(widgetScript) 

Just look at this answer

Robert Niestroj
  • 15,299
  • 14
  • 76
  • 119
Marco
  • 248
  • 3
  • 11