-
Notifications
You must be signed in to change notification settings - Fork 67
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
how to re render a vue component with ngVue #159
Comments
Any update to the Please have a look at the caveats readme for any gothcas that you might be encountering. https://github.com/ngVue/ngVue/blob/master/docs/caveats.md |
I want to re render the whole component again and force a replacement of the component rather than trigger an update cycle. The key attribute generally does this in vuejs already. So I'm looking to add an key attribute on the vue component but I'm not able to add it to component as ngVue doesn't allow me to add special attributes on vue component. The HTML attributes are being passed to component. |
Ah yea ngVue doesn't support this behaviour. If you need to use a loop ngRepeat's tracking should rerender it. If you're not using a loop you'll need to do something to force recompile the directive (e.g., using an ngIf). A somewhat more inefficient approach you could wrap the component with one that takes the key as a prop and sets the I would gladly accept a PR if you want to add this functionality into ngVue. |
I need to re render vue component when a value changes. I tried using key attribute but it doesn't work. What is the correct way to re render the vue component with ngVue?
The text was updated successfully, but these errors were encountered: