Reputation: 20309
I am currently echoing some data from vue.js in laravel like so:
<a href="/beers/@{{ beer.id }}">
<img src="@{{ beer.path }}" alt=""/>
</a>
It works but my console gives me the following error twice:
Any other variables that I have printed out work fine because they are not within double quotes probably.
Funny enough everything seems to work fine though but I would like to get rid of the messy console messages. Does anybody know how to fix this?
Upvotes: 0
Views: 1682
Reputation: 10093
Try without @ sign
<a href="/beers/{{ beer.id }}">
<img src="{{ beer.path }}" alt=""/>
</a>
@ symbol will be removed by Blade; however, {{ name }} expression will remain untouched by the Blade engine, allowing it to instead be rendered by your JavaScript framework.
http://laravel.com/docs/5.1/blade#displaying-data
Upvotes: 3