From 73a5c7fae9ffbe9ada721148c8c454a643aceebe Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 20 Feb 2022 16:11:50 +0100 Subject: chore!: restructure repo I separated public files from the config/dev files. It improves repo readability. I also moved dotenv helper to public/inc directory and extract the Matomo tracker in the same directory. --- .../apps/recipes/src/app/app-routing.module.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 public/projects/angular-small-apps/apps/recipes/src/app/app-routing.module.ts (limited to 'public/projects/angular-small-apps/apps/recipes/src/app/app-routing.module.ts') diff --git a/public/projects/angular-small-apps/apps/recipes/src/app/app-routing.module.ts b/public/projects/angular-small-apps/apps/recipes/src/app/app-routing.module.ts new file mode 100644 index 0000000..74b4b9d --- /dev/null +++ b/public/projects/angular-small-apps/apps/recipes/src/app/app-routing.module.ts @@ -0,0 +1,19 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component'; +import { RecipeComponent } from './components/recipe/recipe.component'; +import { RecipesListComponent } from './components/recipes-list/recipes-list.component'; +import { SearchResultsComponent } from './components/search-results/search-results.component'; + +const routes: Routes = [ + { path: '', component: RecipesListComponent }, + { path: 'recipe/:slug', component: RecipeComponent }, + { path: 'search', component: SearchResultsComponent }, + { path: '**', component: PageNotFoundComponent }, +]; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule], +}) +export class AppRoutingModule {} -- cgit v1.2.3