Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. Vue.Component({
  2. name: 'foo',
  3. template: `
  4. <section v-html="markup"></section>
  5. `,
  6. props: [],
  7. data() {
  8. return {
  9. markup: ''
  10. };
  11. },
  12. created () {
  13. this.setMarkup();
  14. },
  15. methods: {
  16. setMarkup() {
  17. //some asnc code like following which will set markup on callback
  18. asyncFunction((err, html) => {
  19. this.markup = html;
  20. });
  21. }
  22. },
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement