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

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -