Back when using the deprecated router I was able to do a router.config and pass in an object. Thing is, the router itself got configured a bit after the app was started, the
In fact, in short you need to use @Routes instead of @RouterConfig. Here is a sample:
@Routes([
{path: '/crisis-center', component: CrisisListComponent},
{path: '/heroes', component: HeroListComponent},
{path: '*', component: CrisisListComponent}
])
export class AppComponent { }
See this doc on angular.io for more details:
You can notice that it remains some typos in this doc since this chapter is a work in progress ;-)