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:
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: