Skip to content

Instantly share code, notes, and snippets.

@flavioribeirojr
Created August 15, 2017 16:46
Show Gist options
  • Save flavioribeirojr/cb7c66254f7730157cf1245296a1f883 to your computer and use it in GitHub Desktop.
Save flavioribeirojr/cb7c66254f7730157cf1245296a1f883 to your computer and use it in GitHub Desktop.
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { CarrosComponent } from './carros/carros.component';
import { NotFoundComponent } from './not-found/not-found.component';
const routes = [
{path: '', redirectTo: 'carros', pathMatch: 'full'},
{path: 'carros', component: CarrosComponent},
{path: '**', component: NotFoundComponent}
];
@NgModule({
imports: [
RouterModule.forRoot(
routes,
{ enableTracing: true }
)
],
exports: [RouterModule]
})
export class AppRoutingModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment