I have an ionic-side-menus directive for several pages, each with its own menu, can the content and menu page use the same controller in some way?
Yes you can, add the same controller in ui router
to the views you want to share the same controller with (app.js
)
Check out the following plnkr (standard side menu template from ionic)
#app.js
app
state (menu.html) and app.playlists
(playlists.html) shares the same controller (PlaylistCtrl
)
#controllers.js
in PlaylistCtrl
has two variables accessed by the side menu and the main page.
HTH