javascript - NG-Repeat - Not Working In List (ninja image slider) -
i using image slider called ninja slider, works fine using following html
<div id='ninja-slider'> <ul> <li><div data-image="https://pbs.twimg.com/profile_banners/402882947/1414953548/1500x500" href="http://www.menucool.com"></div></li> </ul> </div>
however, when trying data come web service, not playing ball (not displaying of data) don't know going wrong
<div id='ninja-slider'> <div ng-controller="featctrl"> <ul> <li> <div ng-repeat="feat in featured" index="{{$index}}" data-image="{{feat.heder_img}}" href="http://www.menucool.com"></div></li> </ul> </div> </div>
with following in app.js file
.controller('featctrl', function($scope, $http) { $http.get('http://liverpool.li/api/feat/home'). success(function(data, status, headers, config) { $scope.featured = data.featured; }). error(function(data, status, headers, config) {}); })
am doing wrong? thanks
the problem ninja slider.
other people have problem:
ng-repeat list in angularjs isn't updated when ajax call changing value
try init plugin when ajax call insert data $scope.
as see in plugin's site can hard. take @ docs of plugin. if have problem, use slickjs instead, have use jquery plugin.
Comments
Post a Comment