AngularJS, use $scope element inside ng-repeat

+1 Tommy C · July 23, 2015

<h1> {{title}} </h1>

<div class="col-md-4 portfolio-item" ng-repeat="imgt in imgTest.aluminium | filter: query">
<a href="#">
<img class="img-responsive" ng-src="{{imgt.url}}" alt="">

<a href="#">{{ }}</a>
<p>{{ imgt.description }}</p>

This is how the HTML looks like, my question will be can I replace inside the ng-repeat somehow imgTest.aluminiun for imgTest.{{ title}} so it will display the relevant content depending of the value of {{ title }}.

Any recommendation for a different approach in case this is not possible?

Post a Reply


Oldest  Newest  Rating
0 Matt Hayden · November 7, 2015
One of the best course I've ever enrolled in for Angularjs. It's good to start Angularjs from scratch and also covers advance topics and firebase integration along with Angularjs as well. This course is now 90% off for new students and I think you might be interested in. Check out this course here -->
  • 1

HTML / CSS / Web Design


Discuss, share, ask, learn and teach HTML5 and CSS3.