Ioniv Navigation issues using $state.go();


#1

Hey ionic geniuses , I am creating my first mobile app and I am having a bit of trouble with my navigation. I began with the template of tabs and edited then for my login and registration.

What I would like to do is the following:

  1. Login - I can successfully login
  2. Tabs will close
  3. Load a new view I call home that holds code for the menu side bar

When I log in I use $state.go(‘home’) code bellow:

 //Documentation - https://developers.facebook.com/docs/facebook-login/web   
    $scope.FBLogin = function () {
            // Facebook log in credentials
            FB.login(function (response) {
                if (response.status === 'connected') {
                    // Logged into your app and Facebook.
                    console.log('User has Logged into your app and Facebook.');
                    console.log(response);
                    isLoggedIn = true;
                    tokenKey = response.accessToken;
                    // Take user to home menu page
                    $state.go('home');
                } else if (response.status === 'not_authorized') {
                    // The person is logged into Facebook, but not your app.
                    console.log('User is logged into Facebook, but not your app.');
                    console.log(response);
                    isLoggedIn = false;
                } else {
                    // The person is not logged into Facebook, so we're not sure if
                    // they are logged into this app or not.
                    console.log('User is not logged into Facebook or app.');
                    console.log(response);
                    isLoggedIn = false;
                }
            });
        };

However, instead of looking at my side menu I look at a blank page.

Before Login

FOLLOW BY

After Login - no side menu bar

Here is the layout of my states.

Tools in Use

  • Visual Studio
  • ASP.NET for web api

Am I using the correct statement format or am I missing something else entirely?

Thank you for your help!