Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterWilson34
Copy link

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:

  • added two another options to drag-content to be right or left
  • added a $watch to detect if drag-content value changed at any point of time
  • preventing the slide of menu to right if the app direction is left and vise versa

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>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant