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

v-link does not correctly resolve bindings #23

Closed
Lidbetter opened this issue Jun 21, 2015 · 9 comments
Closed

v-link does not correctly resolve bindings #23

Lidbetter opened this issue Jun 21, 2015 · 9 comments

Comments

@Lidbetter
Copy link

games: [
  { id: 23 },
  { id: 24 }
];
<ul v-repeat="game : games">
    <li><a v-link="/games/{{ game.id }}">{{ game.id }}</a></li>
</ul>

I end up at http://exmaple.com/#!/games/{{ game.id }}, not http://exmaple.com/#!/games/23

@adam12
Copy link

adam12 commented Jun 22, 2015

I believe this was fixed by #9, but the build in dist/ is behind.

Can you try building your own version from master? I bet that will fix your problem.

@Lidbetter
Copy link
Author

yes, building from master fixed the issue

@crispouille
Copy link

Hey @Lidbetter @adam12 @yyx990803 ,

Pretty newbie in this new environment, i'm developping my front-end skills on my new portfolio ! Some awesome friends gave me as challenge to do my personnal website on VueJS, from them it's an amazing new framework.
So for the first time I installed node to get vueJS, Browserify + vueify et this vue-router. I'm actually having the same problem with v-link binding. That's why i got on this topic and my question is :
How do i build my own version from master, the only thing i succed to do is building it from my node (npm) install.

@yyx990803
Copy link
Member

@crispouille clone this repo, npm install and then npm run build.

@crispouille
Copy link

@yyx990803 Sry for the delay to answer ! Thank you Evan, trying to do it, however I'll need to get webpack, no ?

@crispouille
Copy link

I build this repo https://github.com/vuejs/vue-router and it's still not working :/ i can't get a dynamic v-link from a v-repeat directive :(
Am i doing something wrong ?

@crispouille
Copy link

Sorry @yyx990803 @Lidbetter ,

I'm comin back on this issue. I really don't get how to get this dynamic link... It awefuly blocks me in my development... :(
I get the warning "
[Vue warn]: Invalid expression. Generated function body: /scope.projet/{{scope.projet.link}}
Uncaught TypeError: Cannot read property 'get' of undefined
"

@yyx990803
Copy link
Member

@crispouille please read the latest doc. Use a JavaScript expression instead of mustaches.

@crispouille
Copy link

@yyx990803
I suppose you're talking about : http://vuejs.org/guide/syntax.html#JavaScript_Expressions
But w/e i'm doing in the v-link, it always finished on this warn " attribute interpolation is not allowed in Vue.js directives and special attributes "

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

4 participants