Problems with logout and return to an instance running from the main page


#1

Hello, I’m new to ionic. I made an app using creator following the workshop based on a sidemenu type project. On the main page add an audio player with html. To access a second page you must log in, but we are not sending it to a login page. The first time I think a user is doing well. Then I log in and I want to re-enter and it does not work.

This is the logout code which I put on the menu page that creates the sidemenu project type.

$Scope.logout = function () {
         $IonicAuth.logout ();
         $IonicSideMenuDelegate.toggleLeft (false);
         $State.go ('menu.radio');
}

It’s simple, when I log out I make sure to go to the main page that calls it radio.

Another problem is that it creates a new instance of radio and I listen to two audios at a time, as I could return to the instance that is already running.

I apologize for my english, is a translator to speed it up

Thank you for taking the time to read the post.