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 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

This comment has been minimized.

Copy link
Member

@yyx990803 yyx990803 commented May 6, 2016

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.

@yyx990803 yyx990803 closed this May 6, 2016
@zwl1619

This comment has been minimized.

Copy link
Author

@zwl1619 zwl1619 commented May 6, 2016

ok,谢谢。

@teckel12

This comment has been minimized.

Copy link

@teckel12 teckel12 commented Oct 11, 2016

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

This comment has been minimized.

Copy link

@zjhiphop zjhiphop commented Oct 13, 2016

Got same problem, not found solution yet.

@yyx990803

This comment has been minimized.

Copy link
Member

@yyx990803 yyx990803 commented Oct 13, 2016

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

@phanan

This comment has been minimized.

Copy link
Member

@phanan 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.
Projects
None yet
5 participants
You can’t perform that action at this time.