Sunday, 27 May 2018

Vue : Add HTML on Javascript to Use On HTML

Add HTML on Javascript to Use On HTML by calling id : el this is call as v-html
this is very usefull to add cross border html component.

add to .js
new Vue({
el: '#app',
  data: {
  HTMLcontent: null,
  },
  created() {
  this.HTMLcontent = `
    <div>I'm section one</div>
    <div>I'm section two</div>
`;
  },
});
Remember we are using ` ( key above tab ) not   by using this (`) key allow you to place raw html on javascript as shown above.

call on .html 


<div id="app">
  <span v-html="HTMLcontent"></span>
</div>



SEO: Trik Terbaik

Lebih 30 Trik Carian Google untuk SEO GraphicLab Gunakan kombinasi carian ini untuk: Mengesan sebutan jenama Mencari peluang backli...