From bcaafd15c16edf5d1a28fdf988564d29c099a9d4 Mon Sep 17 00:00:00 2001 From: Mathew Guest Date: Mon, 29 Jul 2024 05:03:39 -0600 Subject: [PATCH] build: angular routing module exists but not doing anything --- README.md | 9 +++++++++ src/app/app-routing.module.ts | 18 ++++++++++++++++++ src/app/app.module.ts | 16 +++++----------- 3 files changed, 32 insertions(+), 11 deletions(-) create mode 100644 src/app/app-routing.module.ts diff --git a/README.md b/README.md index 9de018b..dc6affe 100644 --- a/README.md +++ b/README.md @@ -55,3 +55,12 @@ https://hub.docker.com/r/wlucha/angular-starter - `npm run version` - Generate changelog - `npm run prettier` - Format the whole project - `npm run audit` - Audit this application using Sonatype OSS Index + +## This app was created and started from https://github.com/wlucha/angular-starter + +Many thanks to all contributors!! and especially Wilfried wlucha. This starter angular scaffold was the best/up-to-date +and the one that worked for me. I have included the MIT-license for the copyright angular-starter. Thank you!! + +## Contact + +- Mathew Guest - mat@zavage.net diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts new file mode 100644 index 0000000..5a48d4e --- /dev/null +++ b/src/app/app-routing.module.ts @@ -0,0 +1,18 @@ +import { NgModule } from '@angular/core'; +import { RouterModule, Routes } from '@angular/router'; +// import { HomeComponent } from './home/home.component'; +// import { AboutComponent } from './about/about.component'; +// import { NotFoundComponent } from './not-found/not-found.component'; +// +const routes: Routes = [ + { path: '', redirectTo: '/home', pathMatch: 'full' }, + // { path: 'home', component: HomeComponent }, + // { path: 'about', component: AboutComponent }, + // { path: '**', component: NotFoundComponent } +]; + +@NgModule({ + imports: [RouterModule.forRoot(routes)], + exports: [RouterModule], +}) +export class AppRoutingModule {} diff --git a/src/app/app.module.ts b/src/app/app.module.ts index eeaf060..4560633 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,21 +2,15 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; +import { AppRoutingModule } from './app-routing.module'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { HttpClientModule } from '@angular/common/http'; import { TranslocoRootModule } from './transloco-root.module'; @NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - BrowserAnimationsModule, - HttpClientModule, - TranslocoRootModule - ], + declarations: [AppComponent], + imports: [AppRoutingModule, BrowserModule, BrowserAnimationsModule, HttpClientModule, TranslocoRootModule], providers: [], - bootstrap: [AppComponent] + bootstrap: [AppComponent], }) -export class AppModule { } +export class AppModule {}