alexjoverm / v-runtime-template

Vue component for compiling templates on the fly using a v-html like API
MIT License
605 stars 70 forks source link

Unable to pass dynamic props #13

Closed SumitChowjar closed 5 years ago

SumitChowjar commented 5 years ago

Hi, Thanks for this amazing package.

I was unable to pass props with dynamic component:

<template>
    <div>
        <v-runtime-template :template="template"></v-runtime-template>
    </div>
</template>
<script>
    export default {
        data() {
            return {
                template: `<hero-component :message="'hello'" class="css-class"/>`
            }
        }
    }
</script>

<hero-component> never recieves message prop value, however i can see class is being pulled.

Pyro979 commented 5 years ago

@sumit-chowjar, I'm not the maintainer, but how sure are you this was a problem with the template and not the "hero-component". I just tested it on my use case and it worked seemed to work.

If you're still having an issue, can you post the definition of hero-component, and if the issue is resolved, please close it. Thanks.