Cannot match any routes angular -
i new angular router, please take @ following code;
export const approutes: routes = [{ path: '', component: gridcomponent, outlet: 'center' },{ path: 'login', component: logincomponent, outlet: 'center' }]; @ngmodule({ imports: [routermodule.forroot(approutes, { usehash: true })], exports: [routermodule] }) export class approutingmodule { } app.html -------- <header></header> <router-outlet name="center"></router-outlet> <footer></footer>
when hit http://localhost:59050/#/login
following error cannot match routes. url segment: 'login'
when hit http://localhost:59050/#/
shows gridcomponent. have used , unused<base href="/" >
. appreciated.
remove outlet: 'center'
dont need if not using auxiliary routes.
Comments
Post a Comment