build: angular routing module exists but not doing anything

This commit is contained in:
Mathew Guest 2024-07-29 05:03:39 -06:00
parent 9ad828cb21
commit bcaafd15c1
3 changed files with 32 additions and 11 deletions

@ -55,3 +55,12 @@ https://hub.docker.com/r/wlucha/angular-starter
- `npm run version` - Generate changelog - `npm run version` - Generate changelog
- `npm run prettier` - Format the whole project - `npm run prettier` - Format the whole project
- `npm run audit` - Audit this application using Sonatype OSS Index - `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

@ -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 {}

@ -2,21 +2,15 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule } from '@angular/common/http'; import { HttpClientModule } from '@angular/common/http';
import { TranslocoRootModule } from './transloco-root.module'; import { TranslocoRootModule } from './transloco-root.module';
@NgModule({ @NgModule({
declarations: [ declarations: [AppComponent],
AppComponent imports: [AppRoutingModule, BrowserModule, BrowserAnimationsModule, HttpClientModule, TranslocoRootModule],
],
imports: [
BrowserModule,
BrowserAnimationsModule,
HttpClientModule,
TranslocoRootModule
],
providers: [], providers: [],
bootstrap: [AppComponent] bootstrap: [AppComponent],
}) })
export class AppModule {} export class AppModule {}