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

[Vue 2.0] How can I terminate rendering in custom directive? #3319

Closed
IanSun opened this issue Jul 25, 2016 · 1 comment
Closed

[Vue 2.0] How can I terminate rendering in custom directive? #3319

IanSun opened this issue Jul 25, 2016 · 1 comment

Comments

@IanSun
Copy link

IanSun commented Jul 25, 2016

Vue.js version

2.0.0

I want to create a custom virtual-repeat directive, but I can't terminate rendering children nodes.
Or any other ideas to simulate?

@yyx990803
Copy link
Member

yyx990803 commented Jul 25, 2016

You cannot. In 2.0 structural directives are reserved and you can only create binding directives.

Instead, create a higher-order component (which controls its children) for that purpose. You will probably want to wait for docs on how to work with the virtual dom. WIP docs here: https://github.com/vuejs/vuejs.org/blob/2.0/src/guide/render-function.md

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

2 participants