bug of reload app is fixed
This commit is contained in:
parent
3015b5ef87
commit
559873d0db
|
@ -140,7 +140,7 @@ export class AppWindow {
|
|||
}
|
||||
}
|
||||
|
||||
public load(): void {
|
||||
public load(hashUrl?: string): void {
|
||||
let startLoad = 0;
|
||||
|
||||
this.window.webContents.once(
|
||||
|
@ -176,7 +176,7 @@ export class AppWindow {
|
|||
isMainFrame: boolean
|
||||
) => {
|
||||
if ('ERR_FILE_NOT_FOUND' === errorDescription) {
|
||||
this.load();
|
||||
this.load(url.parse(validatedURL).hash);
|
||||
return;
|
||||
}
|
||||
log.error(
|
||||
|
@ -187,6 +187,7 @@ export class AppWindow {
|
|||
validatedURL,
|
||||
isMainFrame
|
||||
);
|
||||
|
||||
this.window.webContents.openDevTools();
|
||||
}
|
||||
);
|
||||
|
@ -204,7 +205,8 @@ export class AppWindow {
|
|||
'ucap-webmessenger-app/index.html'
|
||||
),
|
||||
protocol: 'file:',
|
||||
slashes: true
|
||||
slashes: true,
|
||||
hash: hashUrl
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,9 @@ const routes: Routes = [
|
|||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes, { enableTracing: false })],
|
||||
imports: [
|
||||
RouterModule.forRoot(routes, { useHash: true, enableTracing: false })
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user