import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from 'src/modules/cmart/home/home.component';
import { PageCartComponent } from 'src/modules/cmart/page-cart/page-cart.component';
import { PageMineComponent } from 'src/modules/cmart/page-mine/page-mine.component';

const routes: Routes = [
  {
    path: 'cmart',
    children: [
      { path: '', redirectTo: 'home', pathMatch: 'full' },
      { path: 'home', component: HomeComponent },
      { path: 'page-cart', component: PageCartComponent },
      { path: 'page-mine', component: PageMineComponent }
    ]
  }
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
