Seeking help with my routing setup in Angular. Using v12 of Angular.
Encountering a 404 Not Found error when trying to access the direct URL for "register" at somesite.com/register.
Uncertain if this is a server or Angular issue. Here is my router module code:
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { RegistrationPageComponent } from './registration-page/registration-page.component';
const routes: Routes = [
{ path: 'register', component: RegistrationPageComponent },
// { path: 'register', redirectTo: '/register', pathMatch: 'full' }, // NOTE: I have tried this too
{ path: '', redirectTo: '/register', pathMatch: 'full' },
{ path: '**', redirectTo: '/register', pathMatch: 'full' },
];
@NgModule({
imports: [RouterModule.forRoot(routes, { onSameUrlNavigation: 'reload' })],
exports: [RouterModule]
})
export class AppRoutingModule { }
All other routing functions properly.
Your assistance is much appreciated!