import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { MainPageComponent } from './main-page/main-page.component'; import { AboutComponent} from './about/about.component'; import { MapsComponent} from './maps/maps.component'; import { GraficosComponent} from './graficos/graficos.component'; const routes: Routes = [ { path: '', component: MainPageComponent }, { path: 'sobre', component: AboutComponent }, { path: 'mapas', component: MapsComponent}, { path: 'graficos', component: GraficosComponent} ]; @NgModule({ exports: [ RouterModule ], imports: [ RouterModule.forRoot(routes) ] }) export class AppRoutingModule { }