ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.09k stars 13.51k forks source link

Preload tabs and slider error #6428

Closed jalef closed 8 years ago

jalef commented 8 years ago

Short description of the problem:

I use an ion-tabs with preloadTabs=true. At the second tab I use an ion-slider. On the loading of the app I get an error "Cannot read property 'update' of undefined....." (You can see the whole error in the plunker bellow)

This is not happening if a) the slider is on the first tab b) the preloadTabs is set to false

What behavior are you expecting?

The slider on the second tab to load without errors when the preloadTabs is true

Steps to reproduce:

  1. Create an ion-tabs with at least two tabs
  2. On any tab, except the first one, place an ion-slider
  3. An error will occur on console window

Which Ionic Version? 1.x or 2.x Ionic Version: 2.0.0-beta.6

Plunker that shows an example of your issue

http://plnkr.co/edit/2ZHXp0RFw55N8UMveAan?p=preview

Run ionic info from terminal/cmd prompt: (paste output below) Cordova CLI: 5.4.1 Gulp version: CLI version 3.9.0 Gulp local: Local version 3.9.1 Ionic Version: 2.0.0-beta.6 Ionic CLI Version: 2.0.0-beta.23 Ionic App Lib Version: 2.0.0-beta.13 OS: Node Version: v4.2.4

wouterDumon commented 8 years ago

We have the same problem with ionic 2: Cordova CLI: 5.4.1 Gulp version: CLI version 1.2.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 2.0.0-beta.6 Ionic CLI Version: 2.0.0-beta.25 Ionic App Lib Version: 2.0.0-beta.15 OS: Node Version: v4.1.0

wouterDumon commented 8 years ago

Are there already any updates on this?

Manduro commented 8 years ago

I've had some edge case issues with preloading tabs as well. Perhaps we could have an <ion-tab preloadTab="bool"> option to disable the preloading in those cases. This would also be useful if certain tabs make api calls.

msaelices commented 8 years ago

I also have the same issue, only if preloadTabs="true"

marcoskubis commented 8 years ago

Any progress about this? Someone has fixed it? A have this error: RangeError: Maximum call stack size exceeded

If I place this code in anywhere of my page:

<ion-tabs preloadTabs="false">
    <ion-tab (select)="chat()"></ion-tab>
</ion-tabs>`
jgw96 commented 8 years ago

Hello all! Is this still an issue with beta.10? Thanks for using Ionic!

jgw96 commented 8 years ago

Hello all! As it seems it has been a while since there was any activity on this issue i will be closing it for now. Feel free to comment if you are still running into this issue. Thanks for using Ionic!