Controllers.js
angular.module('starter.controllers',[])
.controller('AppCtrl',function($scope,$rootScope) {
$rootScope.side_menu = document.getElementsByTagName("ion-side-menu")[0];
$rootScope.$on('$stateChangeSuccess', function (event, toState, toParams, fromParams, toParams) {
if (toState.name != 'app.map') {
$rootScope.side_menu.style.visibility = "visible";
}
});
})
.controller('MapCtrl',function($scope) {
$rootScope.side_menu.style.visibility = "hidden";
})
New to Angular and Ionic. Have already browsed through similar questions on this issue. Thanks.