CopyPastor

Detecting plagiarism made easy.

Score: 1.9465466556399726; Reported for: String similarity, Exact paragraph match Open both answers

Possible Plagiarism

Plagiarized on 2019-10-08
by chans

Original Post

Original - Posted on 2017-10-29
by mejiamanuel57



            
Present in both answers; Present only in the new answer; Present only in the old answer;

A simple and effective way to solve this, it's by adding your external script into the vue mounted() of your component. I will illustrate you with the Google Recaptcha script:
<template> .... your HTML </template> <script> export default { data: () => ({ ......data of your component }), mounted() { let recaptchaScript = document.createElement('script') recaptchaScript.setAttribute('src', 'https://www.google.com/recaptcha/api.js') document.head.appendChild(recaptchaScript) }, methods: { ......methods of your component } } </script>
Source: [https://medium.com/@lassiuosukainen/how-to-include-a-script-tag-on-a-vue-component-fe10940af9e8][1]

[1]: https://medium.com/@lassiuosukainen/how-to-include-a-script-tag-on-a-vue-component-fe10940af9e8
A simple and effective way to solve this, it's by adding your external script into the vue `mounted()` of your component. I will illustrate you with the [Google Recaptcha][1] script:
<template> .... your HTML </template> <script> export default { data: () => ({ ......data of your component }), mounted() { let recaptchaScript = document.createElement('script') recaptchaScript.setAttribute('src', 'https://www.google.com/recaptcha/api.js') document.head.appendChild(recaptchaScript) }, methods: { ......methods of your component } } </script>
Source: https://medium.com/@lassiuosukainen/how-to-include-a-script-tag-on-a-vue-component-fe10940af9e8

[1]: https://www.google.com/recaptcha/intro/

        
Present in both answers; Present only in the new answer; Present only in the old answer;