[Vuejs]-Loading multiple partial for vuejs component

0👍

./components/user.js:

module.exports = {
    template: '<partial name="users-view-user"></partial>',

    partials: {
        'users-view-user': 'boom'
    }
}

./users-view.js:

module.exports = {
    template: require('users.template.html'),

    components: {
        'user': require('../components/user')
    }
}

I’ve also been told there is a way to have the partial used be a variable, so user.js’s template could be something like <partial name="{{ something-here }}"></partial> which is how I’ll actually end up needing to use it. Haven’t figured this out yet.

Leave a comment