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 parser]: Interpolation inside attributes has been deprecated. Use v-bind or the colon shorthand instead. #2812

Closed
zwl1619 opened this issue May 6, 2016 · 6 comments

Comments

@zwl1619
Copy link

zwl1619 commented May 6, 2016

I change vuejs 1.0 to 2.0,there is an error like this:

[Vue parser]: Interpolation inside attributes has been deprecated. Use v-bind or the colon shorthand instead.

What might be the problem?

@yyx990803
Copy link
Member

As the message suggests: change <div id="{{ id }}"> to <div :id="id">.

Please do not use issues to ask simple questions like this in the future.

@zwl1619
Copy link
Author

zwl1619 commented May 6, 2016

ok,谢谢。

@teckel12
Copy link

But it doesn't work. Trying to do the following:

<div v-for="unit in board.units" id="col{{$index}}">

But getting the error: "Interpolation inside attributes has been deprecated. Use v-bind or the colon shorthand instead."

What should be simple, Vue is making complicated and unknown.

@zjhiphop
Copy link

Got same problem, not found solution yet.

@yyx990803
Copy link
Member

@teckel12 maybe if you've read the docs you will find that it's not complicated nor unknown.

@phanan
Copy link
Member

phanan commented Oct 13, 2016

@teckel12 @zjhiphop It's actually very simple as long as you read the doc, or at least the migration guide. Normally I'm not a fan of using the issue list for support, but since you were saying it was complicated/unknown, here's a fiddle. Please note, though, that just because it's doable doesn't mean you should do it – setting ID's on the fly is often unnecessary.


To keep the issue list clean, I'm locking this from further discussion. You're welcome to open a thread on our very active forum. 😃

@vuejs vuejs locked and limited conversation to collaborators Oct 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants