Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

Issue with $ionicSideMenuDelegate.$getByHandle() when multiple menus are present

$
0
0

@bensinclair wrote:

I have two side menus in my app. A full time left menu and part time right menu that is enabled depending on the view.

I am trying to disable the dragging of the right menu when it is disabled. I am doing it with this code:

$ionicSideMenuDelegate.$getByHandle('right-side-menu').canDragContent(false);

However I am getting this error:

[Warning] Delegate for handle "right-side-menu" could not find a corresponding element with delegate-handle="right-side-menu"! canDragContent() was not called!

Possible cause: If you are calling canDragContent() immediately, and your element with delegate-handle="right-side-menu" is a child of your controller, then your element may not be compiled yet. Put a $timeout around your call to canDragContent() and try again.

Any ideas what I am doing wrong? Am I adding delegate-handle="right-side-menu" to the wrong element? I am running it inside of $timeout. I've tried setting it to 2 seconds timeout to see if that was the cause and made no difference.

Here's a code pen example:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>