Closed ceciliassis closed 6 years ago
Hello! Thank you for opening an issue with us! Would you be able to provide a sample application via GitHub that demonstrates the issue you are having?
Out of context code is always problematic to try and get running because of various dependencies. For this one, my suggestion is to just start with the blank template and do the minimal work required to show the issue you are having, then push it to GitHub and link it here.
Thanks for using Ionic!
Sure thing! https://github.com/ceciliassis/ionic-slider-error-sample I had to use a previous blank project, because the cli just couldn't install the cordova plugin.
Had to make a minor tweak to the sample in order to duplicate:
home.html
<ion-content padding>
<ion-slides pager hideWhen="landscape">
<ion-slide *ngFor="let option of options">
{{option}}
</ion-slide>
</ion-slides>
<ion-slides pager hideWhen="portrait">
<ion-slide *ngFor="let color of colors">
{{color}}
</ion-slide>
</ion-slides>
</ion-content>
home.ts
export class HomePage {
isLandscape: boolean;
options: any[];
colors : any[];
constructor(public navCtrl: NavController) {
this.isLandscape = true;
this.options = ['family', 'food', 'happy', 'sad', 'blood', 'bad', 'joy', 'jump'];
this.colors = ['orange', 'black', 'purple', 'red', 'blue'];
}
}
This allowed me to see a difference between the two and to show that the bullets do not appear on the switch.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!
Type: bug
Ionic Version: 2.x
Platform: mobile webview
-- Description I have two slides at a page, each for one orientation. When I start the app at "portraid" the pager bullets for the "landscape" are not created, e.g, not created at the DOM at all, and vice-versa.
I've noticed the not creation debugging the code and application.
I'm hiding the elements instead of using ngIf, and the values used come from a json file.
-- Reproduce I believe that if the following code is used, you guys may be able to reproduce it.
-- Code He goes the code: game.component.ts
game.component.html
game.component.scss