karol-f / vue-custom-element

Vue Custom Element - Web Components' Custom Elements for Vue.js
https://karol-f.github.io/vue-custom-element/
MIT License
1.97k stars 187 forks source link

Is possible to use interpolation or vue directive in custom element? #170

Closed maxigimenez closed 5 years ago

maxigimenez commented 5 years ago

Hello!

I'm trying to do something like this same with using slot scopes to send data to the element implementation.

<my-custom-elemenet title="My element">
  <div v-if="faslse">Won't show</>
</my-custom-elemenet>

Thanks!

karol-f commented 5 years ago

Hi, as I see You are using Vue prioprietary v-if directive in plain HTML - so it won't work. Regards.

maxigimenez commented 5 years ago

@karol-f Yes, I already figured it away to render vue js inside the custom element and re-render it.

karol-f commented 5 years ago

Great!