I am using Angular 9. I have a JSON file in the root directory that I do not want included in the app. In other words:
/src
|-- /app
|-- /assets
|-- index.html
|-- do_not_include_this_file.json
This means http://example.com/do_not_include_this_file.json should be ignored by the RouterModule and instead go straight to the file. Currently that path will redirect to a PageNotFoundComponent, e.g.
export const APP_ROUTER_PROVIDERS: Routes = [
{ path: 'login', component: LoginComponent },
{ path: '', redirectTo: '/login', pathMatch: 'full' },
{ path: '**', component: PageNotFoundComponent }
];
How can I get the RouterModule to completely ignore a path?