I'm trying to show the image from the database. However, I can't put the angular variable inside the @
sign of the Scala template.
<div class="col-sm-6 col-md-3" ng-repeat="product in products">
<a href="#">
<div class="thumbnail">
<img class="img-responsive" ng-src="@routes.BookStore.getImage(product.name)">
...
</div>
</a>
</div>
It gave Error: Can't find the product variable
. I also tried:
<img class="img-responsive" ng-src="@routes.BookStore.getImage( {{ product.name }} )">
It still gave me the same error. How can I use the AngularJs
variable inside the Scala template?