Ionic Info:
ionic (Ionic CLI) : 4.1.2 (/usr/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.2
@angular-devkit/core : 0.7.3
@angular-devkit/schematics : 0.7.3
@angular/cli : 6.1.3
@ionic/ng-toolkit : 1.0.6
@ionic/schematics-angular : 1.0.4
System:
NodeJS : v8.12.0 (/usr/bin/node)
npm : 6.4.1
OS : Linux 4.15
I’m a beginner with Ionic 4. So I’m facing some routing related issue in my app. Firstly I’ve created the app with side menu and tabs too. I want to show some pages before the tabs page so I do some changes in app-routing.module.ts.
const routes: Routes = [
{ path: '', loadChildren: './pages/splash/splash.module#SplashPageModule' },
{ path: 'tabs', loadChildren: './tabs/tabs.module#TabsPageModule' },
{ path: 'login', loadChildren: './pages/login/login.module#LoginPageModule' },
{ path: 'about', loadChildren: './about/about.module#AboutPageModule' },
];
I want to show first my splash page then login & after success login pass to tabs page but at the login page, first of all, I’m not able to use NavController & there methods like goForward, setRoot. At the login page :
<ion-button margin-top shape="round" color="primary" routerDirection='root' routerLink='/tabs'>Login with Facebook</ion-button>
On Click app through error
core.js:1673 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ‘tabs’
Error: Cannot match any routes. URL Segment: ‘tabs’…