Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop template engine from render a block #6077

Closed
siavashkavousi opened this issue Jul 12, 2017 · 3 comments
Closed

Stop template engine from render a block #6077

siavashkavousi opened this issue Jul 12, 2017 · 3 comments

Comments

@siavashkavousi
Copy link

What problem does this feature solve?

If there was a way to stop template compiling from rendering a block in parent Vue instance and instead let another Vue instance or some other template engine do the job like what Django template engine does using verbatim tag. In my case I want to use many Vue instances inside a page and they might be nested. Note that I can't use components because the page is divided into fragments and rendered from different places.

What does the proposed API look like?

I don't know an exact and clean way but I was thinking of something like Django verbatim

@nickmessing
Copy link
Member

I think that would result in a lot of code due to the way current virtual dom works. But you can still do something similar if you "transform" your vue apps in custom elements. Then each app will be scoped to it's own shadow dom.

@siavashkavousi
Copy link
Author

custom elements doesn't solve the problem unless I use ignoredElements of Vue config.

@yyx990803
Copy link
Member

I'd just avoid mixing templates like this - instead, mount the other instance (with in-js template string) onto an empty element. Either way, I don't think we'd add such an API because the use case is way too niche.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants