Collection-repeat issue in old ionic projects


#1

Hi Ionic Team,
I am able to implement collection-repeat into my new ionic sidemenu project. Its way better than angular’s ng-repeat. Thanks guys.
But I am facing some problem . I tried the same code in my old ionic project and its not working. Please help me with this issue.
Thank you


#2

maybe you should post some code… how you are using the collection repeat and which ionic version your old project based on.


#3

Ionic version is same 1.5.4 ,
I created sidemenu project yesterday and integrated the collection-repeat using codepen example its working . But when I used the same code in my ionic project created in january ,its not working


#4
   .controller('PlaylistsCtrl', function($scope,$http) {
       $scope.playlists = [
            { title: 'hello', id: 1 },
            { title: 'me', id: 2 },
            { title: 'firmino', id: 3 },
            { title: 'Indie', id: 4 },
            { title: 'Rap', id: 5 },
            { title: 'Cowbell', id: 6 }
            ];
   })

  <ion-content overflow-scroll="true">
  <ion-list>
  <ion-item
      ng-click="selectedStore(playlist.Store_Name)"
      collection-repeat="playlist in playlists | filter:search | orderBy: 'Store_Name' ">
      {{playlist.title}}
  </ion-item>
  </ion-list>
  </ion-content>
  </ion-view>

#5

your filter is also defined?


#6

This is not the version of your projects local copy of ionic, but the cli.

You most likely need to update that projects version of ionic with bower update or ionic lib update


#7

Hi @mhartington , I have updated ionic lib as you told. Collection-repeat is working. But the angular’s ng-repeat is not working. What might be the issue ??!.
Updated to ionic lib 1.0.1 using ionic lib update.

Thanks


#8

Previous angular version : 1.3.6
after ionic lib update , angular version : 1.3.13
With ionic lib version 1.0.1 and angular js version 1.3.13 - collection-repeat is working but not ng-repeat


#9

ion-loading-c is not there in ionic.css


#10

The animated font icons were removed in favor of animated svgs.
Please take a moment and look over the changelog from your last version to this current version.

As for ng-repeat, check to see if there are any errors in your console.


#11

hi ,
thanks for your reply. Couldn’t find any errors in the console .ng-repeat is not working only in ion-content inside ion-tab. It is working in other views.


#12

HI @mhartington This is the error i’m getting
[INFO:CONSOLE(12947)] "Uncaught Error: [$injector:modulerr] Failed to instantiate module storeEmpowerement due to:
07-07 05:53:59.740: I/chromium(1793): Error: [$injector:modulerr] Failed to instantiate module storeEmpowerement.controllers due to:
07-07 05:53:59.740: I/chromium(1793): Error: [$injector:modulerr] Failed to instantiate module ngTouch due to:
07-07 05:53:59.740: I/chromium(1793): Error: [$injector:nomod] Module ‘ngTouch’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.


#13

resolved ngTouch by using ionic onSwipe Directive


#14

Only problem I’m facing after ionic lib update -d , ng-repeat not working in ion-content of ion-tab.

Please help me with this issue


#15

any help would be appreciated,

 <ion-tabs>
          <ion-tab title="tab1">
                     <ion-content>
                             //tab content goes here
                     </ion-content>
          </ion-tab>
          <ion-tab title="tab2">
                     <ion-content>
                             //tab content goes here
                     </ion-content>
          </ion-tab>
 </ion-tabs>

The issue i’m facing is , only one ion-tab content is displayed at a time. Either tab1 or tab2. Can anyone help me with this


#16

Please provide a codepen showing the issue.


#17

its working in new project but not in library updated old project.