Comments (9)
I had a similar issue and found that using an ng-if to remove the ion-slides element until the data is loaded into the scope worked for me.
from ionic-v1.
From @PhilHuot on February 3, 2016 20:13
I'm having the same issue. There is a bug when you use ng-repeat in ion-slides if the loop option is set to true. Any help would be appreciated.
Tested on ionic 1.2.4
Just a note: I tested it using the deprecated ion-slide-box and its working fine.
from ionic-v1.
From @wittayaatt on March 4, 2016 7:2
I have found the workaround. I am not so sure if this part of code is actually about but I noticed they remove ng-repeat of looped slide here. So, I add the code to remove ion-slide-page children's ng-repeat.
var newNodeChild = newNode.find('ion-item');
newNodeChild.removeAttr('ng-repeat');
Full ionic.bundle.js start at line 11006
for (i = 0; i < appendSlides.length; i++) {
newNode = angular.element(appendSlides[i]).clone().addClass(s.params.slideDuplicateClass);
newNode.removeAttr('ng-transclude');
newNode.removeAttr('ng-repeat');
var newNodeChild = newNode.find('ion-item');
newNodeChild.removeAttr('ng-repeat');
scope = angular.element(appendSlides[i]).scope();
newNode = $compile(newNode)(scope);
angular.element(s.wrapper).append(newNode);
//s.wrapper.append($(appendSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
}
for (i = prependSlides.length - 1; i >= 0; i--) {
//s.wrapper.prepend($(prependSlides[i].cloneNode(true)).addClass(s.params.slideDuplicateClass));
newNode = angular.element(prependSlides[i]).clone().addClass(s.params.slideDuplicateClass);
newNode.removeAttr('ng-transclude');
newNode.removeAttr('ng-repeat');
var newNodeChild = newNode.find('ion-item');
newNodeChild.removeAttr('ng-repeat');
scope = angular.element(prependSlides[i]).scope();
newNode = $compile(newNode)(scope);
angular.element(s.wrapper).prepend(newNode);
}
Hope this help.
from ionic-v1.
From @Aknilam on March 6, 2016 0:53
+1
I faced similar problem, I modified your Code Pen http://codepen.io/elaval/pen/XXpoLy. Here is delayed change of slides data and auto change of slides.
@wittayaatt unfortunately your code didn't help in this case
from ionic-v1.
From @ruslan-fidesio on August 10, 2016 17:0
Stumbled upon the same problem, here is an example : https://codepen.io/ruslan-fidesio/pen/qNLqYk using the nightly build.
Does anyone have a workarround ?
from ionic-v1.
From @TzaddikO on October 12, 2016 14:52
@ruslan-fidesio I don't think that's the same issue..
However this is still broken in 1.3.1
Here is an updated modification of elaval's Code Pen: http://codepen.io/toltman/pen/mAKEOx
from ionic-v1.
From @rgarciape on January 10, 2017 11:41
Hi @elaval ,
Have you found any workaround?
I´m testing ion-slide component with the option loop set and I suppose my Issue is more or less the same.
The index that I obtain when I load the component is loaded returnning activeIndex = 2, but only running on devices. However, when I launch the app via ionic serve it works fine.
Here are my ionic info:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-beta.11
Ionic CLI Version: 2.1.18
Ionic App Lib Version: 2.1.7
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v7.3.0
Xcode version: Not installed
Thanks in advance¡
from ionic-v1.
I'm having same issue.
There will be two duplicate slides generated when loop mode is set to true.
In the duplicate slide, somehow the ngRepeat is repeated multiple times.
<div class="list">
<!-- ngRepeat: item in page.items --><!-- ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding" style="">
G
</ion-item><!-- end ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
G
</ion-item><!-- end ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
G
</ion-item><!-- end ngRepeat: item in page.items --><!-- end ngRepeat: item in page.items --><!-- ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
H
</ion-item><!-- end ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
H
</ion-item><!-- end ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
H
</ion-item><!-- end ngRepeat: item in page.items --><!-- end ngRepeat: item in page.items --><!-- ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
I
</ion-item><!-- end ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
I
</ion-item><!-- end ngRepeat: item in page.items --><ion-item ng-repeat="item in page.items" class="item ng-binding">
I
</ion-item><!-- end ngRepeat: item in page.items --><!-- end ngRepeat: item in page.items -->
</div>
from ionic-v1.
same issue
this works only web not device.
below options is helpful but not perfect
options.loop = false
from ionic-v1.
Related Issues (20)
- IPHONEX Splash Screen Issue -- Ionic v1 HOT 2
- iPad Pro 12,9' orientation and smart keyboard issues
- WKWebView input[type="date"] localization
- _From @basdp on June 29, 2016 14:20_
- White screen after splash screen (iOS) HOT 2
- scrolling freezes and scroll not working in iphone devices ionic3? HOT 1
- Got “Not Found” status from google-map directional service in ionic3?
- iOS 12.2 Scrolling issues HOT 3
- Input textarea with ion-footer-bar in ionic is behaving erratically
- for ios x
- v1 auto installs older version of cordova-plugin-splashscreen HOT 1
- Gulp v4: Task function must be specified HOT 2
- Collection-repeat not working on android if inside ion-scroll
- Xcode 11 simulator changed device screen layouts & no longer honors safe-area code HOT 21
- Request header field Authorization is not allowed by Access-Control-Allow-Headers ionic V1 ios 11 HOT 2
- Bug: ion-nav-bar id HOT 1
- What is best method to upgrade v1 framework?
- Action Sheet fails to appear on iPad running iOS 14.3 HOT 2
- CSS not loading on ionic-v1 projects using Macs with M1 chip (Apple Silicon)
- Apple Silicon M1, sample tabs app crashes when run on iPhone X simulator (or other i86 platforms) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-v1.