Problem with side-menu and redirection

Hi, I have a little problem concerning the side-menu et the redirection. In my side menu, I’ve got an item which brings the user to another page. This page is juste a little form, and when the user complete it, it automatically brings him to the home page (using a state.go). But after it, the side menu is not longer accessible. I’m sure the problem comes from the redirection. How can I resolve it ? Thanks ! (and sorry if my english is bad)

hi
can you please provide
some of the relevant code
like the ui-route code in app js

**the router : **

.config(function($stateProvider, $urlRouterProvider){
$stateProvider.state(‘home’,{
url:’/home’,
templateUrl:‘templates/home.html’,
controller: ‘HomeCtrl’,
controllerAs: ‘HomeAlias’,
cache: false,
resolve: {
resultList: function($http){
return $http.get(“http://localhost:3000/customers/”);
}}
});
$stateProvider.state(‘ajouter’,{
url:’/ajouter’,
templateUrl:‘templates/ajouter.html’,
controller: ‘AddCtrl’,
controllerAs : ‘AddAlias’
});
$urlRouterProvider.otherwise(’/home’);

**The side menu : **
ion-side-menu side="left" menu-close="true" is-enabled="true"> <ion-list> <ion-item ui-sref="home">Accueil</ion-item> <ion-item ui-sref="find">Chercher</ion-item> <ion-item ui-sref="ajouter">Nouveau Client</ion-item> </ion-list> </ion-side-menu>

**The redirection after submitting the form : **
$state.go('home');

where is the side menu code
in the home template

can you provide the code of the home template

No in index.html.

**Index.html : **
`













Accueil
Chercher
Nouveau Client







Footer





`

It’s here cause I want that my side menu be accessible in all the app.

hi,

you forgot to add the open menu button
if you slide the content the menu will open
for the button it self please edit

 <ion-nav-bar class="bar-positive" >
        <!-- Historique automatique, aidant à la navigation de l'utilisateur -->
            <ion-nav-back-button></ion-nav-back-button>
           <ion-nav-buttons side="left"> 
                  <button class="button button-icon button-clear ion-navicon" menu-toggle="left">
            </button>
          </ion-nav-buttons>
        </ion-nav-bar>

Yes, with the button it works, but if I slide from the left to the rigth it doesn’t work (after submitting the form, in /ajouter

Is it possible to disable the drag ?

yes you can

read this http://ionicframework.com/docs/api/service/$ionicSideMenuDelegate/

and also the problem is with menu-close and root view
you can read about this here http://ionicframework.com/docs/api/directive/menuClose/

the easy thing to do is to add this code to addCtrl controller

$ionicHistory.nextViewOptions({
    disableBack: true
});

but i design my views differently with nested views
and the menu will be abstract

you have a lot of examples in ionic codepen

Thanks, I just added “drag-content=“toggledrag”” on my ion-side-menu-content and it works :slight_smile: