app-routing.module.ts 779 Bytes
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { InformacionComponent } from './informacion/informacion.component';
import { MainComponent } from './main/main.component';
import { BusquedaComponent } from './busqueda/busqueda.component';
import { CompraComponent } from './compra/compra.component';

const routes: Routes = [
	{ path: '', component : MainComponent },
	{ path: 'informacion/:name', component: InformacionComponent },
	{ path: 'busqueda/:search', component: BusquedaComponent },
	{ path: 'comprar/:id', component: CompraComponent }
];
/* { path: '**', component: PageNotFoundComponent } */

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