A central side menu for all different templates?


I am using the ion-side-menus in my app the only thing i find problematic with it is that i have to copy/paste the same ion-side-menus code in different templates where i want to show the side menu? Is there any better way to implement it centrally where its not required to include the code in all the templates where i want to show my side menu? @mhartington @Calendee


Generally speaking - you only need ONE ion-side-menus in your entire app. You shouldn’t need to create a different one for every view. If each view needs different content in the side menu, you might want to explore using a service or “main controller” or detecting state change events to change what appears on the sidemenu for each view.


There are 2 pages at the start of the app where the user needs to register which doesn’t have the sidemenus other than that the content of the side menus are same and are present in all pages
Do i need to write it in my index.html, i am using there. If possible, can you please share an example/codepen ?


I solved it !!! Thanks for replying @Calendee :grinning: , for those who might need help just include the whole code in your index.html and the ion-nav-view tags inside the ion-side-menu-content