This repository was archived by the owner on May 4, 2022. It is now read-only.
This repository was archived by the owner on May 4, 2022. It is now read-only.
bug: Sidebar with expose-aside-when doesn't show if width is defined with variable #142
Open
Description
From @axsauze on April 17, 2016 13:50
There is a bug for the ion-side-menu when you have expose-aside-when. If a width is provided using a scope variable, the sidebar won't display.
Steps to reproduce:
- Create a sidebar (i.e. ion-side-menus)
- In the ion-side-menu directive, add expose-aside-when="large" and width="scopeVar"
- Load the page with large screen and observe how sidemenu does not appear
Code example:
<ion-side-menu
side="left"
expose-aside-when="large">
<!-- width="$ctrl.getSidebarWidth()" -->
<ion-header-bar>
<div class="title title-center header-item">Navigation</div>
</ion-header-bar>
<ion-content>
<ion-list>
<ion-item nav-clear menu-close ui-sref="home">
Home
</ion-item>
</ion-list>
</ion-content>
</ion-side-menu>
Which Ionic Version?
1.x
Quickfix
As a quickfix I've added "ionic.trigger('resize');" inside the function that returns the width (i.e. $ctrl.getSidebarWidth(); )
Copied from original issue: ionic-team/ionic-framework#6204