I had the same error, but for a different reason. It is true that error reporting is still very low in ng2. Error: The route configuration must contain exactly one property “component”, “bootloader” or “redirectTo”, in fact, it simply means that what you put in your routeConfig is incorrect. In my case, my components were undefined. This is due to a stupid mistake.
I had this (component.ts)
export * from './trackerpanel.component'; export * from './login.component'; export * from './oauthcallback.component'; export * from './tracker.component'; export * from './settings.component';
And such import (trackerpanel.component)
import {TrackerComponent, SettingsComponent} from './component';
And I tried to use component tracking and settings in the routes defined in the tracker panel. This gave me undefined components and the above error.
@RouteConfig([ {path: '/', name: 'Tracker', component: TrackerComponent, useAsDefault: true }, {path: '/settings', name: 'Settings', component: SettingsComponent } ])
I changed it to
export * from './tracker.component'; export * from './settings.component'; export * from './trackerpanel.component'; export * from './login.component'; export * from './oauthcallback.component';
And that fixed my routing problem.
Karel-jan
source share