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:
- Login - I can successfully login
- Tabs will close
- 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
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!