import { NgModule } from '@angular/core';
import { Routes, RouterModule, Router } from '@angular/router';
import { ListarComponent } from './pages/listar/listar.component';
import { DetallesComponent } from './pages/detalles/detalles.component';
import { HomeComponent } from '../home/home.component';

const routes: Routes = [
  {
    path: '',
    component: HomeComponent,
    children: [
      { path: 'listado', component: ListarComponent },
      { path: 'detalles/:id', component: DetallesComponent },
      { path: '**', redirectTo: 'listado' }

    ]
  }
]

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