import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import {NotFoundComponent} from './pages/not-found/not-found.component';
import {PublicLayoutComponent} from './public-layout/public-layout.component';
import {HomeComponent} from './pages/home/home.component';
import {FormationsComponent} from './pages/formations/formations.component';
import {ExperienceComponent} from './pages/experience/experience.component';
import {ProjetsComponent} from './pages/projets/projets.component';

const routes: Routes = [
  { path: '', component: PublicLayoutComponent, children: [
      { path: '',  component: HomeComponent },

      { path: 'formations',  component: FormationsComponent },
      { path: 'experience',  component: ExperienceComponent },
      { path: 'projets',  component: ProjetsComponent },
    ]
  },
  { path: '**', component: NotFoundComponent },
];

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