angular-vs-repeat icon indicating copy to clipboard operation
angular-vs-repeat copied to clipboard

ionic app slow initialization

Open casper5822 opened this issue 7 years ago • 1 comments

Hello, i tried the directive in my ionic app. I made a simple test with this code:

<ion-content>
 <div vs-repeat>
  <div class="card" ng-repeat="item in list track by $index">
      {{item.name}}
  </div>
</div>
</ion-content>

The list data are downloaded from the server. I tried to download 5000 items and the initialization is very slow (the page stucks for 3 minutes). It seems like the directive renders all the elements. This happens also when i leave the page and after enter again. Maybe i make some mistake?

Thank you for the help.

More information: Ionic v1.3.3, module vs-repeat imported correctly

casper5822 avatar May 08 '17 10:05 casper5822

@casper5822 You must add styles as well as js files. And add class for your element:

<div class="repeater-container" vs-repeat>
  <div class="item-element well" ng-repeat-start="item in posts">
    <span>{{item.text}} start</span>
  </div>
  <div class="item-element well" ng-repeat-end>
    <span>{{item.text}} end</span>
  </div>
</div>

For me it works and render only a few elements, but when I scroll it confuses and just show a few elements. (This happens only in ionic. In simple web app, everything works fine)

Please let me know if you have the same issue after adding styles and classes.

vahidvdn avatar Jul 22 '17 14:07 vahidvdn