Issues while working with tabs and sidemenus


#1

Hello All, I am trying to create a sample app where i should have tabs and each tab should show side navigation bar.
But some how I am not able to see sidemenus poping up. I have trying from 2 days.

Here is my code http://plnkr.co/edit/SJZZkb1dudpDlv2DUbZd?p=info.

I found couple of plunk where this behaviour is working fine. But the thing is my sidemenu code is located in different HTML and I tried different ways to load it but I am not able to load side menu.

For easy purpose I just placed all the code in my plunk without adding my sidemenu html file (menu.html). Can some one help me fixing this issue?


#2

Hello, Any update on this?


#3

The problem is that you never have the menu.html in your state. So, there is no menu to open.


#4

Calendee, I tried adding menu.html. But its not working. Here is code I added in app.js.

.state(‘menu’, {
url: “/menu”,
abstract: true,
templateUrl: “menu.html”,

  })

Am I missing some thing here?


#5

What I meant is that nothing in your HTML is nested inside the menu.html content. You have no state that is a child of menu. So, menu will never load.

See this working sample : http://codepen.io/calendee/pen/rwnyo


#6

Calendee, Thanks again for your reply.

In the example you sent, menu is in the “index.html” and its getting loaded. But, in my case my menu is in different place (menu.html) and also there will be different menu option based on the page.

So how to load menu at page level?

Thanks again.


#7

Hi Calendee, i tried couple of ways to load menu.html content but some how I am not abel to load menu content.

Can you show me how to get it?


#8

In order to use menus per page, you have to do one of two things:

  1. Have a completely separate menu page & abstract state for each view that would need a new menu. Lets say you have a Menu A and a Menu B. In you state config, if a view needs Menu A, you would set it’s view to the template that has Menu A. If a state needs Menu B, you would set it’s view to the page that has menu B. This is pretty painful.

  2. Have a single abstract view with a menu structure in it. But use two “views”. One for the content and one for the side menus.


#9

See your other post here : How to define side Side menu for each page with a sample


#10

This does the trick. Thanks for you help.

Thanks a lot.