Side Menu With Nested View


#1

Demo has a side menu, and the side menu’s content pane has a nested nav-view:
http://codepen.io/ionic/pen/EtbrF

The demo was created to help answer this question:


Is there a working Side Menu?
Have a slide menu on a partial
#2

Thanks, Adam. This should help me understand some issues about angular-ui-router. Can you point me to a more in depth tutorial related to angular-ui-router ?


#3

This is the best source.


#4

The demo doesn’t work for me.


#5

Hello

The demo is not working.

Also, there is a problem with slide menus, does not close automatically.

Regards


#6

Taking a look at this now, looks like several codepens broke in the last release.


#7

The codepens should be fixed now. It appears codepen.io had temporary issues.


#8

Have you tested it on iPhone ? It works nice on Android , but the toggle button does not work on iPhone’s Safari nor Chrome , maybe the touch function works different there ?


#9

Nice~ It’s help me a lot. Thanks.


#10

@adam Did you delete the codepen ? The site claims it cant find it. I am having a few issues with nested states/views and wanted to see an example. Thanks for all the hard work on ionic. Loving it so far.


#11

If you are referring to this link: http://codepen.io/ionic/pen/EtbrF then no, we didn’t delete it. Codepen must have been down when you tried opening it.


#12

Have you tried the link recently ? Every time I try it, codepen claims there is nothing there. Yet, I can go to other codepens just fine. Strange.


#13

@keithdmoore the link hasn’t worked for me either, fyi.


#14

@adam code pen says it can’t find it.


#15

i think codepen link is broken , but i guess you are looking for this http://codepen.io/anon/pen/fpCyl


#16

that’s it, exactly, thanks.


#17

I downloaded this code to use as a base to setup menus like the ones you have. It works fine, until I change the js file to be the one that ionic installs for me when I create an app or to the more recent beta ones on the web. In either of those cases it fails on $scope.sideMenuController.toggleLeft(); saying sideMenuController is undefined.

Someone needs to figure out why 0.9.26 or 0.9.27 works but 1.xxx does not.


#18

try the code from the docs
http://ionicframework.com/docs/api/directive/ionSideMenus/

 function ContentController($scope, $ionicSideMenuDelegate) {
  $scope.toggleLeft = function() {
    $ionicSideMenuDelegate.toggleLeft();
  };
}

#19

already tried that, tried it again. OK all fixed, took out the $scope which was in front of $ionicSideMenuDelegate.toggleLeft(); and now it works.

.
TypeError: Cannot read property ‘toggleLeft’ of undefined
at Scope.$scope.toggleCategories (http://localhost:8100/js/controllers.js:32:31)
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:18471:21
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:43026:9
at Scope.$eval (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20326:28)
at Scope.$apply (http://localhost:8100/lib/ionic/js/ionic.bundle.js:20424:23)
at HTMLButtonElement. (http://localhost:8100/lib/ionic/js/ionic.bundle.js:43025:13)
at http://localhost:8100/lib/ionic/js/ionic.bundle.js:10478:10
at forEach (http://localhost:8100/lib/ionic/js/ionic.bundle.js:7950:18)
at HTMLButtonElement.eventHandler (http://localhost:8100/lib/ionic/js/ionic.bundle.js:10477:5)
at triggerMouseEvent (http://localhost:8100/lib/ionic/js/ionic.bundle.js:2648:7)