如何将活动课程添加到第一张图片? 我想从数据库中滑动图像,但我不能
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div ng-repeat="image in images">
<div class="row" id="slider">
<div class="col-md-6">
<img src="../backend/uploads/{{image.images}}" width="350" height="370">
</div>
<div class="col-md-6 text-center" id="discount">
<h3>Upto</h3>
<h1>50<small>%</small></h1>
<h3>Discount</h3>
</div>
</div> <!-- row ending -->
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
<span class="sr-only">Next</span>
</a>
</div>
JS
这是我的JS代码,我从json获取数据
var fetch=angular.module("myApp",[])
fetch.controller('slideShowController', ['$scope', '$http', function ($scope, $http) {
$http({
method: 'get',
url: 'getdata.php'
}).then(function successCallback(response) {
$scope.images = response.data;
});
}]);