SideMenu and Navigation template and some questions

Hi,

I’m new to ionic (and Angular in general) development and I wrote a template using side menu and navigation to get some experience, it works and you can find here:

Demo

but I’ve got some questions:

  • It’s right to use an < ion-nav-view > in the index page and than a < ion-side-menus > (in templates/sideMenus.html) ?
  • Am I doing the right thing using one controller for the nav-bar and one controller for < ion-side-menu > (templates/sideMenus.html and scripts/app.js) ?
  • Am I using in the right way ng-class (in templates/sideMenus.html) ?

In Chrome the nav bar is not shown (no problem on Safari, iOS simulator and Nexus 7) and I’m getting this error:

and I don’t know how to interpretate this.

1 Like

Any chance you can make that a simple CodePen sample? I just cloned it locally. Now, I have to npm install. Bower install. Grunt …

That’s a lot of work to ask people to review your code.

Without digging through your code, I can say their is no “right way” to do anything especially regarding controllers. Everyone has a different style. The “right way” is what works for you. There’s no sense getting into a best practices discussion because everyone will have their own best practice.

Thanks for the reply, and sorry for the git annoyance, here you can find the CodePen sample:

You were getting that error because all the Angular and Ionic stuff was in the body instead of the head.

See this updated sample : http://codepen.io/calendee/pen/kqfAL

In your action repo, put all of it in the head.

1 Like

@dcampogiani Have you solved?

yes, no more errors in console.

Is the github code updated?

Yes, and I’ve also updated the readme with build instructions.