1 | import { NgModule } from '@angular/core';
|
---|
2 | import { RouterModule, Routes } from '@angular/router';
|
---|
3 | import { ExploreComponent } from './explore/explore.component';
|
---|
4 | import { HomepageComponent } from './homepage/homepage.component';
|
---|
5 | import { LoginComponent } from './homepage/login/login.component';
|
---|
6 | import { LocationDetailsComponent } from './location/location-details/location-details.component';
|
---|
7 | import { LocationComponent } from './location/location.component';
|
---|
8 | import { LocationsFormComponent } from './locations-form/locations-form.component';
|
---|
9 | import { EditPlannerComponent } from './planner/edit-planner/edit-planner.component';
|
---|
10 | import { PlannerComponent } from './planner/planner.component';
|
---|
11 |
|
---|
12 | const routes: Routes = [
|
---|
13 | {path: 'planners', component: PlannerComponent},
|
---|
14 | {path: 'form', component: LocationsFormComponent},
|
---|
15 | {path: 'edit/planner/:id', component: EditPlannerComponent},
|
---|
16 | {path: 'locations', component: LocationComponent},
|
---|
17 | {path: '', component: HomepageComponent},
|
---|
18 | {path: '', component:LoginComponent},
|
---|
19 | {path: 'location', component: LocationDetailsComponent},
|
---|
20 | {path: 'explore', component: ExploreComponent}
|
---|
21 | ];
|
---|
22 |
|
---|
23 | @NgModule({
|
---|
24 | imports: [RouterModule.forRoot(routes)],
|
---|
25 | exports: [RouterModule]
|
---|
26 | })
|
---|
27 | export class AppRoutingModule { }
|
---|