Ionic 1.3.1: Nested views (2nd-level+) need the overflow-scroll class, or they don't display.
I think I've discovered an issue with nesting views. The content in the 2nd-level views is not displayed, unless you add class "overflow-scroll" to the parent <ion-content> element.
To create the issue:
-
ionic start test_app sidemenu -
Edit
www/js/app.js, and add the following lines to the end of the.config()block:$stateProvider .state('app.foo', { url: '/foo', abstract: true, views: { menuContent: { // this template does not work: template: '<ion-view><ion-content><ion-nav-view name="testView"></ion-nav-view></ion-content></ion-iew>' // this template DOES work: // template: '<ion-view><ion-content class="overflow-scroll"><ion-nav-view name="testView"></ion-nav-view></ion-content></ion-iew>' } } }) .state('app.foo.bar', { url: '', views: { testView: { template: '<ion-view><ion-content>CONTENT INSIDE OF testView</ion-content></ion-view>' } } });
And then update the $urlRouterProvider so that it shows this page on load:
$urlRouterProvider.otherwise('/app/foo');
Go ahead and run the app, and what you'll see is nothing, which I believe is a problem. If you edit the snippet above so that the line for the template that works is uncommented (be sure to comment out the first one), you will see that the content appears. It appears that without this "overflow-scroll" class, the div.scroll element (direct child of the app.foo template's <ion-content> element) receives a CSS transform rule that prevents the testView view from being visible.
Is that the expected behavior, or am I doing something wrong?
Hello, thanks for opening an issue with us! I am going to close this issue as a duplicate of https://github.com/driftyco/ionic/issues/5954. Thanks for using Ionic!