mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-22 02:10:12 +01:00
chore(r5): dependencies update, couple of fixes
This commit is contained in:
parent
44fe93a0c6
commit
98097f5e27
18 changed files with 138 additions and 115 deletions
|
|
@ -51,20 +51,21 @@ const APP_PROVIDERS = [
|
|||
export class AppModule {
|
||||
|
||||
constructor(public appRef: ApplicationRef, public appState: AppState) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
hmrOnInit(store) {
|
||||
if (!store && !store.state) return;
|
||||
if (!store || !store.state) return;
|
||||
console.log('HMR store', store);
|
||||
this.appState.state = store.state;
|
||||
this.appState._state = store.state;
|
||||
this.appRef.tick();
|
||||
delete store.state;
|
||||
}
|
||||
|
||||
hmrOnDestroy(store) {
|
||||
let cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement);
|
||||
const cmpLocation = this.appRef.components.map(cmp => cmp.location.nativeElement);
|
||||
// recreate elements
|
||||
let state = this.appState.state;
|
||||
const state = this.appState._state;
|
||||
store.state = state;
|
||||
store.disposeOldHosts = createNewHosts(cmpLocation);
|
||||
// remove styles
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue