Blade and angular mixing

Posted 3 years ago by dhiman252

In Laravel we can escape {{}} by prefixing the first curly brace with an @ symbol. @{{ $variable }} will return {{ $variable }} and AngularJS can deal with that.

Now, I have an image tag in the blade like the following:

<div ng-repeat="ratingImage in user.ratingImages track by $index"><img src="@{{ ratingImage }}"/></div>

and when I run this I get the following errors in my firebug console:

`"NetworkError: 404 Not Found -" {{ user.image}} 

"NetworkError: 404 Not Found -"`

How to resolve this ?

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.