When I click on the thumbnail image in the media object, for the race "Australian GP", the modal with its information is opened. But when I click on the thumbnail object for the race "Chinese GP", the modal still shows the information about the Australian GP rather than showing that of the Chinese GP. Where am I going wrong or what more do I have to add? And more importantly, can someone explain to me why my code is not working?
<div class="container" ng-controller="seasonCtrl">
<div class="row" ng-repeat="race in races">
<div class="col-md-12">
<div class="media first-media">
<div class="media-left media-middle">
<a href="#" data-toggle="modal" data-target="#ausmod"><img src="{{race.image}}" class="img-thumbnail media-object"></a>
</div>
<div class="media-body">
<h2 class="media-heading"><a data-toggle="modal" data-target="#ausmod">{{race.name}}</a> <label class="label label-pill label-success">{{race.p1}}</label> <label class="label label-pill label-primary">{{race.p2}}</label> <label class="label label-info label-pill">{{race.p3}}</label></h2>
<a href="#" data-toggle="modal" data-target="#ausmod"><p>{{race.smallinfo}}</p></a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="ausmod" ng-repeat="race in races">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header"><button type="button" class="close" data-dismiss="modal">×</button>
<h4>{{race.modalName}}</h4>
</div>
<div class="modal-body">
<p>{{race.modalDesc}}</p>
</div>
</div>
</div>
</div>
</div>
<script>
var app=angular.module("seasonApp", []);
app.controller("seasonCtrl", ["$scope", function($scope){
$scope.races=[
{
image:"Aliens.jpg",
name:"Australian GP",
p1:"Nico Rosberg",
p2:"Lewis Hamilton",
p3:"Sebastian Vettel",
smallinfo:"wgliu uyrgf pw77t 2ieugt9weud w87e7t d",
modalName:"Australian GP 2016",
modalDesc:"test info for australia"
},
{
image:"daily_tasks.jpg",
name:"Chinese GP",
p1:"Nico Rosberg",
p2:"Sebastian Vettel",
p3:"Daniil Kvyat",
smallinfo:"wgliu uyrgf pw77t 2ieugt9weud w87e7t d",
modalName:"Chinese GP 2016",
modalDesc:"test info"
}
];
}]);
</script>