Open tabs by clicking button

#1

hey guys,
please can somebody can help me to fix this?

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'tabs/dashboard'
Error: Cannot match any routes. URL Segment: 'tabs/dashboard'
    at ApplyRedirects.push../node_modules/@angular/router/fesm5/router.js.ApplyRedirects.noMatchError (router.js:2469)
    at CatchSubscriber.selector (router.js:2463)
    at CatchSubscriber.push../node_modules/rxjs/_esm5/internal/operators/catchError.js.CatchSubscriber.error (catchError.js:34)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (Subscriber.js:80)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:60)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (Subscriber.js:80)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:60)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber._error (Subscriber.js:80)
    at MapSubscriber.push../node_modules/rxjs/_esm5/internal/Subscriber.js.Subscriber.error (Subscriber.js:60)
    at TapSubscriber.push../node_modules/rxjs/_esm5/internal/operators/tap.js.TapSubscriber._error (tap.js:61)
    at resolvePromise (zone.js:831)
    at resolvePromise (zone.js:788)
    at zone.js:892
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
    at Object.onInvokeTask (core.js:17279)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
    at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
    at drainMicroTaskQueue (zone.js:601)

i would like to open dinamicaly tabs by clicking button like

<ion-button (click)="openTabs()">AAAAA</ion-button>

and the openTabs functions i tried are:

openTabs() {
    this.router.navigateByUrl('/tabs');
  }

openTabs() {
    this.router.navigate(['/tabs']);
  }

tabs routes:

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      { path: 'dashboard', loadChildren: '../dashboard/dashboard.module#DashboardPageModule' },
      { path: 'history', loadChildren: '../history/history.module#HistoryPageModule' },
      { path: 'settings', loadChildren: '../settings/settings.module#SettingsPageModule' },

      {
        path: 'accounts',
        loadChildren: '../accounts/accounts.module#AccountsPageModule'
      },

      {
        path: 'accounts/account',
        loadChildren: '../account/account.module#AccountPageModule'
      },

      { path: 'contacts', loadChildren: '../contacts/contacts.module#ContactsPageModule' },
    ]
  },
  {
    path: '',
    redirectTo: '/tabs/dashboard',
    pathMatch: 'full'
  }
];

app routes:

const routes: Routes = [
     { path: '', redirectTo: 'login', pathMatch: 'full' },
     { path: 'tabs', loadChildren: './pages/tabs/tabs.module#TabsPageModule' },,
  ];

thanks