I experimented with dozens of configurations trying to get this to work, but can't figure it out.
The specified url is as follows:
anything and otherthing can literally be anything.
The route configuration I was hoping for would work, but would ultimately take on specific routes where https://domain.com/profile would call catchall ('**'), which seems very strange, as far as I understand catchall should only start or catch routes that are not defined above:
Where app.module has the following:
export const routes = [ { path: '', loadChildren: 'app/dashboard/dashboard.module' }, { path: 'profile', loadChildren: 'app/profile/profile.module' }, { path: '**', loadChildren: 'app/anything/anything.module' } ]; @NgModule({ imports: [ BrowserModule, RouterModule.forRoot(routes) ], declarations: [AppComponent] bootstrap: [AppComponent] }) export class AppModule {}
Where anything.module has the following:
const routes = [ { path: ':id',
In any case, so that the above use case works with Angular Router 3.4.1?
angular angular2-routing
Nathan walker
source share