alexjoverm / v-runtime-template

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

Create a directive instead of component #4

Closed padcom closed 6 years ago

padcom commented 6 years ago

Just a thought, mainly inspired by the component name (v-render-template). Since v-html is a directive maybe it'd make sense to just create another directive instead of a full component?

Would that be at all possible?

I can clearly imagine myself using something like that instead of v-html

<div v-render-template="tpl" />
alexjoverm commented 6 years ago

It might be an option, not sure though, it'd require some investigation. However, since it's already implemented as a component, better to keep it like it. Components gives you more control to extend them

MrBasque commented 5 years ago

exactly my idea @padcom, it would definitely make life simpler ;-)