Base solution for your next web application
Open Closed

location.reload cause 404 file not found error #6061


User avatar
0
rafalpiotrowski created

version 6.3.1

I am using multitenant site address

when I hit address default.myappdomain the application gets the default and check if it is a tenant is so it goes and call changeTenantIfNeeded

changeTenantIfNeeded(tenantId?: number): boolean {
    if (this.isCurrentTenant(tenantId)) {
        return false;
    }

    abp.multiTenancy.setTenantIdCookie(tenantId);
    location.reload();
    return true;
}

this reloads the page and I get error 404


1 Answer(s)
  • User Avatar
    0
    rafalpiotrowski created

    added , { useHash: true } to root-routing.module.ts

    imports: [RouterModule.forRoot(routes, { useHash: true })],