1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
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';
import { RecipeCardComponent } from './recipe-card/recipe-card.component';
const routes: Routes = [
{ path: '', redirectTo: '/main', pathMatch: 'full' },
{ path: 'main', component: RecipeCardComponent },
{ 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 { }
|