When I removes # from angular 4 project using following code. in app.module.ts file
imports: [
...
RouterModule.forRoot(routes, { useHash: true }) // remove second argument
]
and in providers
@NgModule({
.....
providers: [
// Below line is optional as default LocationStrategy is
PathLocationStrategy
{provide: LocationStrategy, useClass: PathLocationStrategy}
]
})
using this code I am able to remove # from url. But when I refresh page it goes to localhost:4200. Previously (with # when I had refresh page) it not goes to default page localhost:4200.how to handle this refresh error without # in url in angular 4
Auth service is a core modules it will autherise when login and refresh time.
Get current user details with token values in App component.