summaryrefslogtreecommitdiff
path: root/recipeBuddy/src/app/app-routing.module.ts
blob: ae6754682b6f33d69c0794936182c213aacd14ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { CookPageComponent } from './cook-page/cook-page.component';
import { PreCookPopUpComponent } from './pre-cook-pop-up/pre-cook-pop-up.component';
import { AddRecipeComponent } from './add-recipe/add-recipe.component';
import { EditRecipeComponent } from './edit-recipe/edit-recipe.component';
import { ShoppingCartComponent } from './shopping-cart/shopping-cart.component';

const routes: Routes = [
	{ path: '', redirectTo: '/cook', pathMatch: 'full' },
	{ path: 'preCook' , component: PreCookPopUpComponent },
	{ path: 'add', component: AddRecipeComponent },
	{ path: 'cook', component: CookPageComponent },
	{ path: 'edit', component: EditRecipeComponent },
	{ path: 'cart', component: ShoppingCartComponent }
];

@NgModule({
	imports: [RouterModule.forRoot(routes)],
	exports: [RouterModule]
})
export class AppRoutingModule { }