Skip to content

Instantly share code, notes, and snippets.

@nicolasleal570
Created October 23, 2020 03:51
Show Gist options
  • Save nicolasleal570/1b3e75d7fdc8cff112599e9432ad10bc to your computer and use it in GitHub Desktop.
Save nicolasleal570/1b3e75d7fdc8cff112599e9432ad10bc to your computer and use it in GitHub Desktop.
Archivo de rutas de Angular
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AboutUsComponent } from './pages/about-us/about-us.component';
import { HomePageComponent } from './pages/home-page/home-page.component';
import { PostsPageComponent } from './pages/posts-page/posts-page.component';
const routes: Routes = [
{ path: '', component: HomePageComponent },
{ path: 'about', component: AboutUsComponent },
{ path: 'posts', component: PostsPageComponent },
];
@NgModule({
imports: [RouterModule.forRoot(routes)],
exports: [RouterModule],
})
export class AppRoutingModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment