List of repetitions of the collection inside Ionic Pop Up

I have a collection repeat list with a search bar at the top of the list (inside an ionic popup). On a real device (Android 4.4), only 9 entries are displayed in the list.

I have a code created by repeating a collection inside an ion popup. Here it displays all the records, but not on the device itself.

I recently upgraded from Ionic 1.1.1 to Ionic 1.2.4 . Is this a problem due to the new version of Ionic, I also tried to use Ionic 1.2.4 at night and also work.

Does the phone browser version determine the difference, the phone browser version is " Mozilla / 5.0 (Linux 4.4.2; en-us; 6043D Build / KOT49H). AppleWebKit / 537.36 (KHTML, for example, Gecko) version /4.0 chrome / 30.0.0 Mobile Safari /537.36. "

Here is the HTML code for ion float.

<div class="list list-inset" ng-style="{ 'display': 'inline-flex', 'padding': '0'}"> <label class='item item-input' ng-style='{ 'border-right-color': '#FFFFFF'}'> <i class='icon icon-left ion-ios7-search placeholder-icon''></i> <input type='text' ng-model='search' placeholder='Search'> </label> <a class='button button-icon icon ion-ios7-close-empty placeholder-icon' ng-style='{ 'color': '#B83E2C' }' on-touch='clearSearch()''> </a> </div> <div class='listPopUpHeight'> <ion-scroll direction="y" class="available-scroller" style="height:350px"> <ion-list> <ion-item class="dataSourceItem" collection-repeat="item in dataSource | filter:search" collection-item-width="100%" item-height="15%" on-tap="tapped(item)"> {{item.Text}} </ion-item> </ion-list> </ion-scroll> </div> 

Here is the JS code:

 angular.module('ionicApp', ['ionic']) .controller('PopupCtrl', function($scope, $ionicPopup, $timeout) { $scope.dataSource = []; $scope.showList = function(){ var list=[]; for (var i = 0; i < 1000; i++) { list.push({ 'Id': i, 'Text': 'Text_' + i }); } $scope.dataSource = list; var listPopup = $ionicPopup.show({ templateUrl: 'popupTemplate.html', title: 'List', scope: $scope, buttons: [ { text: 'Cancel' }, ] }); }; }); 

There is something I'm missing. Please reply.

Thank you in advance:)

+5
source share

Source: https://habr.com/ru/post/1244573/


All Articles