Closed xAlien95 closed 10 years ago
For me the content is not visible when in a normal view too, not modal, I'm loading my content from a webservice.
@mlynch it isn't working also in Ionic 0.9.19 "Koala".
I see the issue for both dynamic and modal. The size just isn't being computed. I'm fixing it now.
Okay, I made a fix for this, unfortunately it involves updating the slidebox size manually when the content changes.
Inject SlideBoxDelegate
into your controllers and when the content changes, call:
SlideBoxDelegate.update()
and it will update the child slidebox.
I'm looking for a better solution, which might be as simple as setting the width to be full, but unfortunately when the content changes the slidebox also needs to recompute the number of pages, etc. so it needs a nudge to know its children changed.
Thank you @mlynch, it works, but there's an error in the console log everytime I slide slides:
Error: [$compile:nonassign] Expression 'undefined' used with directive 'slideBox' is non-assignable!
http://errors.angularjs.org/1.2.2/$compile/nonassign?p0=undefined&p1=slideBox
at http://uxiedex.altervista.org/js/angular/angular-scenario.js:9870:12
at parentSet (http://uxiedex.altervista.org/js/angular/angular-scenario.js:15837:25)
at Object.parentValueWatch (http://uxiedex.altervista.org/js/angular/angular-scenario.js:15852:23)
at Scope.$digest (http://uxiedex.altervista.org/js/angular/angular-scenario.js:21286:47)
at Scope.$apply (http://uxiedex.altervista.org/js/angular/angular-scenario.js:21532:24)
at http://uxiedex.altervista.org/js/angular/angular-scenario.js:23057:36
at completeOutstandingRequest (http://uxiedex.altervista.org/js/angular/angular-scenario.js:13813:10)
at http://uxiedex.altervista.org/js/angular/angular-scenario.js:14119:7 angular-scenario.js:18951
You can see it here, clicking on "Accedi" and then on "Registrati su Uxie Dex" :)
Hmm, seems like an issue with angular-scenario. Isn't that just for testing, not production?
That site will be a free database when users could login to set preferences. No ads, zero cost for the server maintenance and the right credits framework and datas used. Could there be problems I haven't thought?
I get the same issue with SlideBox NOT in a modal.
I included angular-scenario and still see this output:
Error: [$compile:nonassign] Expression 'undefined' used with directive 'slideBox' is non-assignable!
http://errors.angularjs.org/1.2.7/$compile/nonassign?p0=undefined&p1=slideBox
at http://localhost:8000/js/angular/angular-scenario.js:9870:12
at parentSet (http://localhost:8000/js/angular/angular-scenario.js:15920:25)
at Object.parentValueWatch (http://localhost:8000/js/angular/angular-scenario.js:15934:23)
at Object.watchExpression (<anonymous>:754:29)
at Scope.$digest (http://localhost:8000/js/angular/angular-scenario.js:21567:40)
at Scope.$delegate.__proto__.$digest (<anonymous>:844:31)
at Scope.$apply (http://localhost:8000/js/angular/angular-scenario.js:21828:24)
at Scope.$delegate.__proto__.$apply (<anonymous>:855:30)
at http://localhost:8000/js/angular/angular-scenario.js:23361:36
at completeOutstandingRequest (http://localhost:8000/js/angular/angular-scenario.js:13897:10) angular-scenario.js:19194```
This is fixed in PR https://github.com/driftyco/ionic/pull/398
Problem is in sliderView.js : var index = parseInt(options.startSlide, 10) || 0;
The option startSlide
is not set in ionicSlidebox.js
Actually… my PR did not fix this. While working on that PR, I modified my slide box so that it had the attribute active-slide="1"
set. THAT is what fixes this problem.
I'm having this problem in a modal as well. I tried to inject SlideBoxDelegate
, but it didn't work. I eventually figured out that I needed to inject $ionicSlideBoxDelegate
, but when I call update()
I see all of the slides contents. I'm using 0.9.26
.
It'd be great to see a working example in the documentation.
I'm having the same issue where the slidebox's width is sometimes set to 0px initially.
@skitterm can you recreate the issue in a codepen and describe how to replicate the issue? This would help us narrow it down. Thanks
I have this problem too in 1.0.0-beta.12
@manfromshadow Creating a codepen would help us narrow this down. Thanks
I had the same issue but found why: the slider was instanciated while his parent was hidden, so it was unable to correctly calculate the sizes.
Using ng-if
fixed it for me: http://forum.ionicframework.com/t/ion-slide-box-and-ng-repeat/9826/5
This makes me think the "ng-if" should be added as a proper conditional inside the ion-slide-box
directive.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. 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.
When you try to insert a slidebox in a modal, its width becames 0px. Here's a plnkr. Thanks for reading :)