javascript - can you use the Vue directive v-html with Pug? -
when try use v-html element attribute below insert pug code outputting in plain text instead of creating link. possible create pug template using v-html element attribute?
html:
script(src="https://unpkg.com/vue/dist/vue.js") div#app h1(v-once) {{title}} p {{sayhello()}} a(v-bind:href="link") google p(v-html="linkhtml") js:
new vue({ el: '#app', data: { title: 'hello world', link: 'http://google.com', linkhtml: 'a(v-bind:href="link") google' }, methods: { sayhello: function() { this.title = 'hi'; return this.title; } } }); current output:
hello world hi google a(v-bind:href="link") google desired output:
hello world hi google google
Comments
Post a Comment