SlideMenu on one page only using seed project


#1

Hello! I am trying to put a SlideMenu on a single page using the seed project. However, I cannot get it to work.

I can only make it show properly if I wrap

<ion-nav-bar type="bar-assertive" animation="nav-title-slide-ios7" back-button-type="button-icon button-clear" back-button-icon="ion-ios7-arrow-back"></ion-nav-bar>

<ion-nav-view></ion-nav-view>

with the code. However, this gives me the slidemenu on all pages.

How can I put it on just this page?

<ion-view title="'Opskrifter'" left-buttons="leftButtons" right-buttons="rightButtons">

    <ion-content has-header="true" has-tabs="true">
    
        Content

    </ion-content>

</ion-view>

#2

You’re going to need to use different states and nav-views for this. See this article:

http://sudostack.com/side-menus-in-the-ionic-framework/


#3

@Calendee I try to use different states and nav views like this http://sudostack.com/side-menus-in-the-ionic-framework/, but i get a blank screen and I don’t receive error messages.

Do you have any idea?

cc @SudoStack


#4

@plcosta do you have your project on github or perhaps a jsbin?

My immediate thought is that you’re not loading anything into <nav-view> at a given state.

I may need to update the post a bit. It’s a bit hard to explain something in a blog post that may be easily explained in person. Sorry about that.


#5

@SudoStack no problem man, thanks for helping.


#6

@plcosta: the code actually looks okay to me… are you hitting the proper route? http://localhost:[port_num]/#/ or http://localhost:[port_num]/#/main?


#7

@SudoStack: yes, http://localhost:80/#/main/home


#8

Try removing the controller from your main state declaration. If that doesn’t work, I’ll clone it down and make an attempt to figure out later this evening.