angular2 routing - Angular 2 - Remove Hash (#) from the URL -
i loading modules loadchildren("123#childmodule") appmodule , appending /#/ in browser.
i have tried usehash : false providers pathlocationstrategy, still see issue.
been doing research on did not find solution far. idea? in advance.
first of all, believe trying lazyloading module routes code should :
{ path: 'mgt', loadchildren: 'app/your-mgt/your-mgt.module#yourmodule'} and # shows on url have nothing "#" here .
default , angular used pathlocationstrategy
routermodule.forroot(routes) i guess yours :
routermodule.forroot(routes, { usehash: true } or routermodule.forroot(routes, { usehash: false } not sure whats backend , if have 1 , , use ajax fetch data . if using express in backend . try this
Comments
Post a Comment