These are my routes:
import { Routes } from '@angular/router';
import {WelcomeComponent} from "./welcome/welcome.component";
import { LoginComponent } from './login/login.component';
export const routes: Routes = [
{path: '', component: WelcomeComponent},
{path: 'login', component: LoginComponent},
{path: '**', component: WelcomeComponent}
];
I buid my project using ng buid.
When I enter a not defined path, I expect the application to redirect to '/' path as it happens during development, but I get an 404 Error.
I get the same error even when I manually enter /login URL.
What am I missing?