Hello,
Im building and app that requires a horizontal slider. So I search on the web a slider that I liked and came up with this : https://github.com/gilbox/infinite-slider/blob/master/README.md
The problem is that after installing it and adding it to my project I can’t swipe left or right, like in the demo.
I looked at the console log, and no errors showed up; it simply doesn’t work.
Has anyone come up with this problem before?
Its kind of hard trying to correct something that doesnt show errors
If someone could help me I would really appreciate.
The code that I am using is this
<ion-view >
<ion-content>
<div infinite-slider-boundary class="infinite-slider-boundary infinite-slider-window" >
<div infinite-slider snap classify-closest classify-snapped closest-item-id="closestItemId" is-jumping="listData.isJumping" snapped-item-id="listData.snappedItemId" class="infinite-slider-container">
<div infinite-slider-content class="infinite-slider-content">
<div class="slide" ng-repeat="item in listData.items track by $index">
<img draggable="false" ng-src="{{item.img}}" alt=""/>
</div>
</div>
</div>
</div>
</ion-content>
</ion-view>
My js:
.controller('ListingCtrl', function($scope,$rootScope,$state,$stateParams,$sce) {
var imgs = [
{
img: 'img/categorias/icons_Bombinhas-06.png',
link: 'img/categorias/icons_Bombinhas-06.png'
},,...
];
imgs = imgs.concat(imgs);
$scope.listData = {
items:imgs,
isJumping: true,
snappedItemId: 1 // this works!
};
})