Why Angular JS “ng-repeat” is not working? - angularjs

I have this owl crousal :
<section id="intro">
<div class="sm-holder">
<div class="sm">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
<i class="fab fa-linkedin-in"></i>
</div>
</div>
<h1>
<span class="year">2020</span>
</h1>
<div class="owl-carousel owl-intro owl-loaded owl-drag">
<div class="owl-stage-outer">
<div class="owl-stage"
style="transform: translate3d(0px, 0px, 0px); transition: all 0.25s ease 0s; width: 21010px;">
<div class="owl-item cloned active">
<div class="item" style="background: url(../Administration/MainPageHeader/camels1.jpg)">
</div>
</div>
<div class="owl-item cloned">
<div class="item" style="background: url(../Administration/MainPageHeader/camels5.jpg)">
</div>
</div>
</div>
</div>
</div>
<div class="owl-counter"></div>
</section>
it work ok.
noW
I need to make it dyanmic.
i want to rpeat
and changing camels1.jpg based on value from DB.
I have created angualr app.
in my scope
I have
$http.get('http://192.168.1.40/Test/Apis/GetHeaderImages.ashx')
.then(function (response) {
$scope.headerImages = response.data;
var arr2 = JSON.parse(JSON.stringify(response.data));
$scope.headerImages = arr2;
});
here headerImages = 0: {Id: 5, ImageUrl: "camels7.jpg"} 1: {Id: 6, ImageUrl: "20202902051438KC.jpg"}
I did
أهلاَ بكم في
إتحاد سباقات الهجن
2020
<div class="owl-carousel owl-intro owl-loaded owl-drag">
<div class="owl-stage-outer" >
<div class="owl-stage"
style="transform: translate3d(0px, 0px, 0px); transition: all 0.25s ease 0s; width: 21010px;"id="owl-stage">
<div class="owl-item cloned" ng-repeat="x in headerImages" >
<div class="item" style="background: url(../Administration/MainPageHeader/{{x.ImageUrl}})">
</div>
</div>
</div>
</div>
</div>
</section>
<div class="owl-counter"></div>

got it working with asp.net tags
<div class="owl-carousel owl-intro">
<div class="item" style="background: url(../Administration/MainPageHeader/camels5.jpg)"></div>
<%foreach (var item in imagesUrl)
{%>
<div class="item" style="background: url(<%=item %>)">
</div>
<%
} %>
</div>
<div class="owl-counter"></div>
so ng-repeat was not repeating dives

You should assign it to $scope.headerImages rather than headerImages in API callback.
$scope.headerImages = arr2;

Related

Pagination is not working across the pages in Angular JS

I have implemented Pagination and Search in AngularJS but its working in only on displayed page.
Html file
<div id="home" class="tab-pane fade in active">
<div class="row"><div class="col-md-10"><h1 style="font-size: 25px;margin-bottom:26px;">Jobs</h1></div></div>
<div class="row">
<div class="col-md-0"></div>
<div class="col-md-10" style="margin-top:5px">
<div class="container">
<li style="list-style-type: none;display: inline-block;width: 85%;"> <form name="myForm" action="/action_page.php" method="get" class="adjust" style="margin-left:-26px;margin-top:2px;">
<input type="text" name="Keyword" placeholder="Keyword" class="borderclr" ng-model='search.jobTitle' style="border: 1px solid #ddd;padding: 10px;width: 48%;margin-left:5px;">
<input type="text" name="Location" placeholder="Location"class="borderclr" ng-model='search.location' style="border: 1px solid #ddd;padding: 10px;width: 50%;">
</form>
</li>
<li style="list-style-type: none;display: inline-block;">
<i class="fa fa-plus" title="Add Job" ng-click="openJobModal('add')" data-toggle="modal" data-target="#jobDetails"
style="margin-top: 33px; color: rgb(237,78,110);cursor: pointer;font-size: 22px;margin-left: -140px;outline:none;"></i>
</li>
</div>
<div class= row>
<div class="col-md-10"></div>
<div class="col-md-2"></div>
</div>
<div ng-repeat="Job in JobDetails.slice(((currentPage-1)*itemsPerPage), ((currentPage)*itemsPerPage)) | filter:search:strict">
<!-- <p style="font-size: 13px;color: #808080;padding: 18px;margin-left: 49px;">Found 395 Jobs</p> -->
<h3 style="font-size: 18px;color: #000;font-weight: 600;margin-top: 2px;margin-left: -4px;text-align:left;margin-bottom: -7px;">
Title : {{Job.jobTitle}}</h3>
<div class="row" style="margin-left:1px;">
<div class="col-md-8" style="margin-left: -16px;margin-top:6px"> <b> {{Job.location}} | {{Job.jobRate}} | {{Job.jobType}}</b></div>
<div class="col-md-1"><i class="fa fa-eye" title="View Job" ng-click="Jobview(Job.SerialNumber)" data-toggle="modal" data-target="#jobDetails" style="margin-top:10px;cursor: pointer;color : rgb(237,78,110);font-size:22px;outline:none;"></i></div>
<div class="col-md-1"><i class="fa fa-trash" title="Delete Job" ng-click="JobDelete(Job.SerialNumber,Job.Publish)" style="margin-top:10px;cursor: pointer;color : rgb(237,78,110);font-size:22px;outline:none;"></i></div>
<div class="col-md-2"><button style="padding: 6px 22px;" ng-click="jobPublish('true',Job.SerialNumber)" type="button" ng-hide="{{Job.Publish}}" class="btn btn-success">Publish</button>
<button type="button" ng-click="jobPublish('false',Job.SerialNumber)" ng-show="{{Job.Publish}}" class="btn btn-warning">UnPublish</button>
</div>
</div>
<p style=" text-align: justify;text-justify: inter-word;">
<b>Description :</b>{{Job.jobDescription | limitTo: 400 }}{{Job.jobDescription.length > 400 ? '...' : ''}}</p>
<hr>
</div>
</div>
</div>
<div ng-show="JobDetails !=''" style="text-align: right;">
<pagination total-items="JobDetails.length" ng-model="currentPage" ng-change="pageChanged()" max-size="maxSize" class="pagination-sm" boundary-links="true" items-per-page="itemsPerPage"></pagination>
</div>
</div>
Script
$scope.JobDetails = [];
for(var i=response.data.length-1;i>=0;i--){
$scope.JobDetails.push(response.data[i]);
}
$scope.viewby = 5;
$scope.totalItems = $scope.JobDetails.length;
$scope.currentPage = 1;
$scope.itemsPerPage = $scope.viewby;
$scope.maxSize = 7; //Number of pager buttons to show
When i use search box and search , the results are only for that page . If we remove the pagination the search is working fine.
Can some one please help.
your search filter is applied to currant page items only therefore you get only filtered item that exist in this page.
you can do the following to solve the problem:
<div ng-repeat="Job in currentJobDetails | filter:search:strict">
in your pageChanged() function you can add:
function pageChanged(){
currentJobDetails = JobDetails.slice(((currentPage-1)*itemsPerPage), ((currentPage)*itemsPerPage));
}
you may also need to add search button and call function when is clicked:
function search(){
currentJobDetails = JobDetails;
}
this will search across all your items

Angular UI Bootstrap multiple carousel one by one

I am using AngularJS with ui bootstrap module.
1) What I need is my carousel to change its items one by one. I found a code (by other person) but it's only in jQuery.
Codepen code in jQuery
html:
<div class="container">
<h1>Use Bootstrap's carousel to show multiple items per slide.</h1>
<div class="row">
<div class="col-md-12">
<div class="carousel slide multi-item-carousel" id="theCarousel">
<div class="carousel-inner">
<div class="item active">
<div class="col-xs-4"><img src="http://placehold.it/300/f44336/000000" class="img-responsive"></div>
</div>
<div class="item">
<div class="col-xs-4"><img src="http://placehold.it/300/e91e63/000000" class="img-responsive"></div>
</div>
<div class="item">
<div class="col-xs-4"><img src="http://placehold.it/300/9c27b0/000000" class="img-responsive"></div>
</div>
<div class="item">
<div class="col-xs-4"><img src="http://placehold.it/300/673ab7/000000" class="img-responsive"></div>
</div>
<div class="item">
<div class="col-xs-4"><img src="http://placehold.it/300/4caf50/000000" class="img-responsive"></div>
</div>
<div class="item">
<div class="col-xs-4"><img src="http://placehold.it/300/8bc34a/000000" class="img-responsive"></div>
</div>
<!-- add more items here -->
<!-- Example item start: -->
<div class="item">
<div class="col-xs-4"><img src="http://placehold.it/300/8bc34a/000000" class="img-responsive"></div>
</div>
<!-- Example item end -->
</div>
<a class="left carousel-control" href="#theCarousel" data-slide="prev"><i class="glyphicon glyphicon-chevron-left"></i></a>
<a class="right carousel-control" href="#theCarousel" data-slide="next"><i class="glyphicon glyphicon-chevron-right"></i></a>
</div>
</div>
</div>
</div>
less CSS:
.multi-item-carousel{
.carousel-inner{
> .item{
transition: 500ms ease-in-out left;
}
.active{
&.left{
left:-3%;
}
&.right{
left:3%;
}
}
.next{
left: 3%;
}
.prev{
left: -3%;
}
#media all and (transform-3d), (-webkit-transform-3d) {
> .item{
// use your favourite prefixer here
transition: 500ms ease-in-out left;
transition: 500ms ease-in-out all;
backface-visibility: visible;
transform: none!important;
}
}
}
.carouse-control{
&.left, &.right{
background-image: none;
}
}
}
jQuery
$('.multi-item-carousel .item').each(function(){
var next = $(this).next();
if (!next.length) {
next = $(this).siblings(':first');
}
next.children(':first-child').clone().appendTo($(this));
if (next.next().length>0) {
next.next().children(':first-child').clone().appendTo($(this));
} else {
$(this).siblings(':first').children(':first-child').clone().appendTo($(this));
}
});
2) So I want multiple items change one bye one. How to do this in angularJS? Any ideas or directions?

How to apply ng-repeat on carousel with multiple items using angular js?

<div class="carousel slide" id="myCarousel">
<div class="carousel-inner">
<div class="item active">
<div class="row">
<div class="col-md-3 home__li-align" ng-
repeat="electronic in allItem.slice(0,4) | filter :enter code here 'electronics'">
<a ui-sref="" ng-click="`enter code here`view(mobile)">
<img ng-src="../asset/img/{{electronic.image[0]}}" alt="Not Found" style="height: 200px;width:50%;" />
<div class="home__label-align">{{electronic.product_name}}</div>
<div class="home__label-align"> ₹: {{electronic.cost}}</div>
</a>
</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-md-3 home__li-align" ng-repeat="electronic in allItem.slice(4,8) | filter : 'electronics'">
<a ui-sref="" ng-click="view(mobile)">
<img ng-src="../asset/img/{{electronic.image[0]}}" alt="Not Found" style="height: 200px;width:50%;" />
<div class="home__label-align">{{electronic.product_name}}</div>
<div class="home__label-align"> ₹: {{electronic.cost}}</div>
</a>
</div>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev" style="margin-bottom: 70px; margin-left: -70px; color: black;"><i class="glyphicon glyphicon-chevron-left" ></i></a>
<a class="right carousel-control" href="#myCarousel" data-slide="next" style="margin-bottom: 70px; margin-right: -70px; color: black;"><i class="glyphicon glyphicon-chevron-right"></i></a>
</div>
Only item active class is working and i want 4 div in one slide of carousel then on clicking carousel control. It should bring next carousel having 4 div.So any Solution of that?
I can understand your problem and i created solution fiddle please follow below link.
<script>
var myApp = angular.module('myApp',[]);
//myApp.directive('myDirective', function() {});
//myApp.factory('myService', function() {});
myApp.controller("MyCtrl",MyCtrl);
function MyCtrl($scope) {
$scope.list = [];
for(var i = 0; i< 16;i++){
$scope.list.push(i);
}
}
</script>
<div ng-app="myApp" ng-controller="MyCtrl">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
<div class="item active">
<div class="row">
<div class="col-sm-3" style="height:100px; background:red; color:green; font-size:18px;" ng-repeat="l in list.slice(0,4)">
Hello {{l}}
</div>
</div>
</div>
<div class="item">
<div class="row">
<div class="col-sm-3" style="height:100px; background:red; color:green; font-size:18px;" ng-repeat="l in list.slice(4,8)">
Hello {{l}}
</div>
</div>
</div>
<div class="item">
<img src="http://placehold.it/450x350" alt="Slide 3">
<div class="carousel-caption">
Caption Slide 3
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
http://jsfiddle.net/r2wLz6xr/507/

HIde and show images with ng-repeat and ng-show and ng-hide and ng-click based on index

I have 2 columns, first column is Unselected images and button called Select picture next to it and second column is selected images and button called Remove picture. if i click Select picture button for one image at left column, it should move to right side column and it should disappear in left side column.
Viceversa for the remove picture. if i click remove picture at right, it should disappear at right and should appear at left.I should be able to select and remove multiple pictures. i have used angular js. Can anyone please help me
Plunker here https://plnkr.co/edit/rtJP91MtYISyVZkdFWr8?p=preview
<body ng-controller="myController">
<div class="row">
<div class="col-xs-6 col-sm-5 col-md-5">
<h3 style="text-align: center;text-shadow: 0px 4px 6px;">All Pictures</h3>
<div class="row" ng-repeat="media in pinMedia" ng-init="setMedia=[]">
<!-- pin.media_id!=media._id || -->
<div ng-show="!setMedia[$index]" class="col-xs-12 col-sm-12 col-md-5">
<img ng-src="http://placehold.it/{{images}}" width="200px">
<div class="col-xs-12 col-sm-12 col-md-5">
<a class="btn btn-success" style="border: .0625rem solid transparent;padding: .465rem 1rem;" ng-click="setMedia[$index]=false"><i class="fa fa-picture-o"></i> Set Picture</a>
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-5 col-md-5">
<h3 style="text-align: center;text-shadow: 0px 4px 6px;">Selected Pictures</h3>
<div ng-repeat="media in pinMedia">
<!-- pin.media_id==media._id && -->
<div ng-show="setMedia[$index]">
<img ng-src="http://placehold.it/{{images}}" width="200px">
<div>
<a class="btn btn-success " style="border: .0625rem solid transparent;padding: .465rem 1rem;" ng-click="removeMediaForCurrentPin(media)"><i class="fa fa-picture-o"></i> Remove Picture</a>
</div>
</div>
</div>
</div>
</div>
I corrected your Plunker, please look at new example.
HTML:
<body ng-controller="myController">
<div class="row">
<div class="col-xs-6 col-sm-5 col-md-5">
<h3 style="text-align: center;text-shadow: 0px 4px 6px;">All Pictures</h3>
<div class="row" ng-repeat="media in pinMedia">
<!-- pin.media_id!=media._id || -->
<div class="col-xs-12 col-sm-12 col-md-5">
<img ng-src="http://placehold.it/{{images}}" width="200px" />
<p>{{media.Name}}</p>
<div class="col-xs-12 col-sm-12 col-md-5">
<button ng-disabled='limit()' class="btn btn-success" style="border: .0625rem solid transparent;padding: .465rem 1rem;" ng-click="toselected(media)">
<i class="fa fa-picture-o"></i>
Set Picture</button >
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-sm-5 col-md-5">
<h3 style="text-align: center;text-shadow: 0px 4px 6px;">Selected Pictures</h3>
<div ng-repeat="media in selected">
<!-- pin.media_id==media._id && -->
<div>
<img ng-src="http://placehold.it/{{images}}" width="200px" />
<p>{{media.Name}}</p>
<div>
<a class="btn btn-success " style="border: .0625rem solid transparent;padding: .465rem 1rem;" ng-click="tosource(media)">
<i class="fa fa-picture-o"></i>
Remove Picture</a>
</div>
</div>
</div>
</div>
</div>
</body>
Javascript:
var newapp = angular.module('angularApp', []);
newapp.controller('myController',function($scope){
$scope.pinMedia=[
{Name:'130x130'},
{Name:'150x150'},
{Name:'170x170'},
{Name:'180x180'},
{Name:'190x190'},
{Name:'200x200'},
{Name:'210x210'}
];
$scope.selected=[];
FromOne2Another = function(source, target, item){
target.push(item);
source.splice(source.indexOf(item),1);
}
$scope.toselected = function(item){
FromOne2Another($scope.pinMedia, $scope.selected, item);
}
$scope.tosource = function(item){
FromOne2Another($scope.selected, $scope.pinMedia, item);
}
$scope.limit=function(){
return 5==$scope.selected.length;
}
});

Ionic Scrolling issue - Page scroll breaks when using ion-scroll

I am pretty new to Ionic Framework and the entire hybrid platform.
I have developed a very simple application by using too many tutorials over the internet and the application is working perfectly as expected except the home page.
I have an overall page view that has an ion-content and then there are multiple ion-scroll on the page.
The problem is the scrolling doesn't work as the normal native Android/iOS application.
Can anyone help with this?
Attached below is the full code:
<ion-view ng-init="LoadPage()">
<ion-content ng-show="contentloading" scroll="true">
<ion-refresher pulling-text="Pull to refresh" on-refresh="LoadPage()" >
</ion-refresher>
<div class="row-no-padding">
<div class="row row-no-padding row-center" style="padding-left: 5px;">
<div class="col-33 col-center">
<h5 class="latest-news headingStyle" data-fittext data-fittext-max="12px">Latest News</h5>
</div>
<div class="col col-center">
<ion-slide-box does-continue="true" auto-play="true" show-pager="false">
<ion-slide ng-repeat="item in Slides" ng-click="GoToPost({{item.id}})">
<h4 class="{{FontDetails(1)}}" style="margin-left: 5px;word-break: break-all;white-space:nowrap;overflow:hidden; color:#bb1515;font-size:12px;" ng-bind-html="item.title | unsafe"></h4>
</ion-slide>
</ion-slide-box>
</div>
</div>
</div>
<div class="row-no-padding">
<ion-slide-box does-continue="true" auto-play="true" show-pager="false">
<ion-slide ng-repeat="item in Slides" ng-click="GoToPost({{item.id}})">
<div class="row-wrap">
<div class="col" style="background: url({{item.thumbnail_images.medium.url}}) no-repeat center center; -webkit-background-size: cover;-moz-background-size: cover;background-size: cover;min-height: 200px;height:250px;max-height:300px;z-index: 1;">
</div>
<div style="background:black;position:absolute;opacity: 0.5;filter: alpha(opacity=50);height:auto;bottom:0%;width: 100%;overflow:hidden;z-index:2; vertical-align: top;" class="col">
<h4 class="latest-news-add {{FontDetails(1)}}" ng-bind-html="item.title | unsafe"></h4>
</div>
</div>
</ion-slide>
</ion-slide-box>
</div>
<!-- </div>
</div>-->
<div class="row-no-padding">
<div class="row row-no-padding" style="padding: 5px;">
<div class="col col-33 col-center">
<h5 class="latest-news categoryHeading {{FontDetails(1)}}">{{'Gujarat'| translate}}</h5>
</div>
</div>
<div class="row row-no-padding" style="padding: 5px; overflow: auto;white-space: nowrap; overflow-y: scroll; position: relative;">
<div class="col" >
<ion-scroll direction="x" scroll-outside="true" class="wide-as-needed">
<span>
<span class="wrapperhome" ng-repeat="item in gujarat">
<img on-swipe-left="onSwipeLeft()" on-swipe-right="onSwipeRight()" ng-src="{{item.thumbnail_images.medium.url}}" ng-click="GoToPost({{item.id}})" width="150px" height="150px"/>
<div>
<h6 class="{{FontDetails(1, 0)}}" ng-bind-html="item.title | unsafe"></h6>
</div>
</span>
</span>
</ion-scroll>
</div>
<!--<div class="col">-->
</div>
<div class="row row-no-padding" style="padding: 5px;">
<div class="col col-33 col-center">
<h5 class="latest-news categoryHeading {{FontDetails(1)}}">{{'Politics'| translate}}</h5>
</div>
</div>
<div class="row row-no-padding" style="padding: 5px;">
<div class="col">
<ion-scroll direction="x" class="wide-as-needed">
<span>
<span class="wrapperhome" ng-repeat="item in politics">
<img ng-src="{{item.thumbnail_images.medium.url}}" ng-click="GoToPost({{item.id}})" width="150px" height="150px"/>
<div>
<h6 class = "{{FontDetails(1)}}" ng-bind-html="item.title | unsafe"></h6>
</div>
</span>
</span>
</ion-scroll>
</div>
</div>
<div class="row row-no-padding" style="padding: 5px;">
<!-- <div class="col col-34" style="text-align: center;margin-bottom: 10px;background-color: firebrick;vertical-align: middle;text-align: center;color:white;font-family: HouseGothicHG23Text-Bold;font-size:1.30em;">
Technology
</div>-->
<div class="col col-center">
<h5 class="latest-news {{FontDetails(1)}} categoryHeading ">{{'Technology'| translate}}</h5>
</div>
</div>
<div class="row row-no-padding" style="padding: 5px;">
<div class="col">
<ion-scroll direction="x" class="wide-as-needed">
<span>
<span class="wrapperhome" ng-repeat="item in technology">
<img ng-src="{{item.thumbnail_images.medium.url}}" ng-click="GoToPost({{item.id}})" width="150px" height="150px"/>
<div>
<h6 class = "{{FontDetails(1)}}" ng-bind-html="item.title | unsafe"></h6>
</div>
</span>
</span>
</ion-scroll>
</div>
</div>
</div>
<div class="row row-no-padding" style="padding: 5px;">
<div class="col">
<ion-list>
<div ng-repeat="item in FooterItems" ng-if="(item.MenuOption !== 'Home' || item.MenuOption !== 'Favorite')" style="margin-bottom: 10px;">
<ion-item style="border: 0px!important;" class="item-stable item item-icon-left home-item-footer item-icon-right {{FontDetails(1)}}" ng-click="toggleGroup({{item.group}},'{{item.link}}')" ng-class="{active: isGroupShown({{item.group}})}">
<i class="icon"><img src="img/{{item.link}}.png" style="width:20px;height:20px;"/></i>
{{item.MenuOption| unsafe | translate}}
<i ng-class="isGroupShown({{item.group}}) ? 'ion-chevron-down' : 'ion - chevron - right'" class="icon" style="font-size:1em;"></i>
</ion-item>
<ion-item class="item-accordion" ng-show="isGroupShown({{item.group}})" style="padding-left:1px;padding-top:1px!important">
<!-- <div class="row row-no-padding">
<div class="col">
<ion-scroll direction="x" class="wide-as-needed">
<span>
<span class="wrapper"
ng-repeat="categoryitem in item.items">
<img ng-src="{{categoryitem.thumbnail_images.medium.url}}" ng-click="GoToPost({{categoryitem.id}})" width="150px" height="150px"/>
<div>
<h6 class = "{{FontDetails(0)}}" ng-bind-html="categoryitem.title | unsafe"></h6>
</div>
</span>
</span>
</ion-scroll>
</div>
</div>-->
<div class="row row-no-padding" style="padding: 5px;">
<div class="col">
<ion-scroll direction="x" class="wide-as-needed">
<span>
<span class="wrapperhome" ng-repeat="categoryitem in item.items">
<img ng-src="{{categoryitem.thumbnail_images.medium.url}}" ng-click="GoToPost({{categoryitem.id}})" width="150px" height="150px"/>
<div>
<h6 class = "{{FontDetails(1)}}" ng-bind-html="categoryitem.title | unsafe"></h6>
</div>
</span>
</span>
</ion-scroll>
</div>
</div>
</ion-item>
</div>
</ion-list>
</div>
</div>
</ion-content>
You need to make sure you're declaring the height and width of each <div> you're scrolling. From the ion-scroll docs:
Basic usage:
<ion-scroll zooming="true" direction="xy" style="width: 500px; height: 500px">
<div style="width: 5000px; height: 5000px;
background: url('https://upload.wikimedia.org/wikipedia/commons/a/ad/Europe_geological_map-en.jpg') repeat">
</div>
</ion-scroll>
Note that it's important to set the height of the scroll box as well as the height of the inner content to enable scrolling. This makes it possible to have full control over scrollable areas.

Resources