Skip to content

Instantly share code, notes, and snippets.

@A-Kiwams
Created March 26, 2019 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save A-Kiwams/0ab10d5e4cf25b0bb9a1edfae5a90541 to your computer and use it in GitHub Desktop.
Save A-Kiwams/0ab10d5e4cf25b0bb9a1edfae5a90541 to your computer and use it in GitHub Desktop.
Routing
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { AboutComponent } from './about/about.component';
import { OffersComponent } from './offers/offers.component';
import { PaymentsComponent } from './payments/payments.component';
import { ContactComponent } from './contact/contact.component';
import { HousingComponent } from './housing/housing.component';
const routes: Routes = [
{ path: '', component: HomeComponent },
{ path: 'about', component: AboutComponent },
{ path: 'offers', component: OffersComponent },
{ path: 'housing', component: HousingComponent },
{ path: 'payments', component: PaymentsComponent },
{ path: 'contact', component: ContactComponent },
];
@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