ionic-team / ionic-v1

The repo for Ionic 1.x. For the latest version of Ionic, please see https://github.com/ionic-team/ionic
Other
192 stars 187 forks source link

Enable dragcontent to be right or left to handle RTL side menu support #315

Open peterWilson34 opened 6 years ago

peterWilson34 commented 6 years ago

Short description of what this resolves:

On dynamic change of ion-side-menu side property to support RTL direction the menu is stopped working and need to reload the page to work again with right direction which is not a good practice for mobile UX.

Changes proposed in this pull request:

Ionic Version: 1.x

use case sample

<ion-side-menus enable-menu-with-back-views="false">
    <ion-side-menu-content drag-content="{{$root.direction}}">
       <ion-nav-bar class="bar-stable">
          <ion-nav-back-button>
          </ion-nav-back-button>

          <ion-nav-buttons side="{{$root.direction}}" >
              <button class="button button-icon button-clear ion-navicon" menu-toggle="{{$root.direction}}">
             </button>
          </ion-nav-buttons>

        </ion-nav-bar>
      <ion-nav-view name="menuContent"></ion-nav-view>
   </ion-side-menu-content >

   <ion-side-menu   side="{{$root.direction}}" >
     <!--menu goes here -->
   </ion-side-menu>

</ion-side-menus>