Created
October 23, 2020 03:51
-
-
Save nicolasleal570/1b3e75d7fdc8cff112599e9432ad10bc to your computer and use it in GitHub Desktop.
Archivo de rutas de Angular
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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