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

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -