Skip to content

v-repeat in v-if seem to work incorrectly #569

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

Closed
OEvgeny opened this issue Nov 17, 2014 · 5 comments
Closed

v-repeat in v-if seem to work incorrectly #569

OEvgeny opened this issue Nov 17, 2014 · 5 comments
Labels

Comments

@OEvgeny
Copy link

OEvgeny commented Nov 17, 2014

Hello! In this example no movies titles when add button is pushed. See fiddle:
http://jsfiddle.net/5sH6A/60/

@yyx990803 yyx990803 added the bug label Nov 17, 2014
@igalmizrahi
Copy link

try changing ( template: "#movie" ) to below:
template: document.getElementById("movie").innerHTML
It seems it's only working with strings right now

@OEvgeny
Copy link
Author

OEvgeny commented Nov 19, 2014

Yeah, thanks!
My example also works with v-show instead v-if.

@yyx990803
Copy link
Member

This is actually caused by the fact that Vue compiled your <script> template for some reason (it should be skipped)... If you put the #movie template in <head> instead of after <body> it would work properly...

@igalmizrahi
Copy link

looking at the frame source on jsfiddle now, it seems there are two body tags because of OEvgeny's code. When I replaced <body> with <div id="app"> and el: 'body' with el: '#app', everything worked fine.

@OEvgeny
Copy link
Author

OEvgeny commented Nov 19, 2014

Thanks for your answers guys! Now it's clear.

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

No branches or pull requests

3 participants