问题描述:

when I get the json array and put into ng-repeat combines angular-slick, but when running, angular-slick did not work.

 <div ng-app="myApp" ng-controller="customersCtrl">

<slick autoplay="true" dots="true" infinite="false" speed="300" slides-to-show="6" touch-move="false" slides-to-scroll="1" init-onload="true" data="myData">

<div ng-repeat="data in myData">

<a href=""><img src="https://a2faceshop.com/img/customer/120/a2giayluoi/{{data.logo}}"></a>

</div>

</slick>

</div>

and this is my script

<script>

var app = angular.module('myApp', ['slick']);

app.controller('customersCtrl', function ($scope, $http) {

$http({method: 'GET', url: 'https://a2faceshop.com/api/web/shop_product/setting-websites/get-all-partner-by-shop?shop_name=a2giayluoi&is_return_array=1'

}).success(function (data, status, headers, config) {

$scope.myData = data;

}).error(function (data, status, headers, config) {

alert("error")

});

</script>

相关阅读:
Top