import { Route } from '@angular/router'; import { AuthGuardSerivce } from '../shared/auth-guard.service'; // import { Routes } from '@angular/router'; import { CheckoutComponent } from './checkout.component'; import { CustomerInfoComponent } from './customer-info/customer-info.component'; import { PayReviewComponent } from './pay-review/pay-review.component'; import { ConfirmComponent } from './confirm/confirm.component'; import { StaticComponent } from '../static/static.component'; export const CheckoutRoutes: Route[] = [ { path: 'checkout', component: CheckoutComponent, canActivate: [ AuthGuardSerivce ], children: [ { path: '', redirectTo: 'customer-info', pathMatch: 'full' }, { path: 'customer-info', component: CustomerInfoComponent, canActivate: [ AuthGuardSerivce ] }, { path: 'pay-review', component: PayReviewComponent, canActivate: [ AuthGuardSerivce ] }, { path: 'confirm', component: ConfirmComponent, canActivate: [ AuthGuardSerivce ] } ] }]