It's a known issue that if we include the <script>
tag in the "el" of Vue.js, an error will be displayed. This prevents me from being able to include any ads in the Vue "el" section.
For example:
new Vue({
el: '#app',
data: {
message: 'Hello Vue.js!'
}
})
<script src="https://unpkg.com/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="3a4c4f5f7a08140e1408">[email protected]</a>/dist/vue.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="app">
{{ message }}
<script data-cfasync='false' type='text/javascript' src='//p31898.clksite.com/adServe/banners?tid=31898_118905_0'></script>
</div>
- It is recommended to keep templates responsible for mapping state to the UI and avoid including tags with side-effects like
<script>
. These tags will not be parsed.
So, is it impossible to include ads in Vue "el"?