Using 1 menu on 10 pages


#1

Hi all,

I am new at ionic and I am still trying to understand it. It doesn’t help that nearly everybody on the Internet has a different solution and most solutions don’t even come close to a working solution.

I am making an app where you can login. I have got the login section working. After login the user is redirected to the user dashboard. This is the “secure” section. In the secure section there are 10 different pages. From what I understand of ionic is that each page has it’s own directory in the src/pages directory. Does this mean that I have to put the menu on all 10 pages? How do I get the menu in the app? I use the ion-side-menu tag and then I get errors saying ion-side-menu is not a known element?

I have looked all over the Internet and there isn’t a single person who has a straight answer how this should be done so I am hoping someone here understand ionic.

Yours sincerly,
Martijn


#2

I would recommend looking at how the conference app does this.


#3

Sweet, looks perfect. Thanks.


#4

This forum is very, very good compared to other sources. I taught myself how to code, so my primary resource was google. Definitely one of the most frustrating experiences I’ve been through. Lots of people using the definition in the definition. It’s shocking how much time and effort people can put into answering questions that weren’t even asked. Ionic’s forum operates pretty rationally. Refreshing.


#5

What I don’t get is I see alot of code that uses dollar sign notations for variables.

For example is use HttpModule. I see alot of people using $http.get(). This doesn’t work, it’s not even valid javascript according to intellij and Firefox. I have to import the HttpModule, inject the Http object in the constructor of the page and then use this.http.get() function. Is this the difference between ionic versions and angular versions?


#6

It was valid code in AngularJS which was used with Ionic v1. Make sure the code your are following isn’t for that.