Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Vue.Component({
- name: 'foo',
- template: `
- <section v-html="markup"></section>
- `,
- props: [],
- data() {
- return {
- markup: ''
- };
- },
- created () {
- this.setMarkup();
- },
- methods: {
- setMarkup() {
- //some asnc code like following which will set markup on callback
- asyncFunction((err, html) => {
- this.markup = html;
- });
- }
- },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement