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>



email mailto: pretext

 <a href="mailto:designoutsourced.com+info@gmail.com?subject=Maklumat%20lanjut%20pakej&body=Hai,%20saya%20berminat%20tahu%20lebi...