Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
destroy() {
this.options = null
this.queryparams = null
this.options = new Object()
this.queryparams = new Object()
this.commandSub.unsubscribe()
this.dataSub.unsubscribe()
this.eventSub.unsubscribe()
this.store.dispatch(new StateReset(PageState))
}
ngOnDestroy(): void {
this.store.dispatch(new StateReset(PageBuilderState))
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { NgxsModule } from '@ngxs/store';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';
import { DEVTOOLS_REDUX_CONFIG, LOGGER_CONFIG, OPTIONS_CONFIG, STATES_MODULES } from './store.config';
import { NgxsResetPluginModule } from 'ngxs-reset-plugin';
import { CoreModule } from './core.module';
@NgModule({
imports: [
CommonModule,
NgxsModule.forRoot(STATES_MODULES, OPTIONS_CONFIG),
NgxsReduxDevtoolsPluginModule.forRoot(DEVTOOLS_REDUX_CONFIG),
NgxsLoggerPluginModule.forRoot(LOGGER_CONFIG),
NgxsResetPluginModule.forRoot()
],
exports: [NgxsModule]
})
export class NgxsStoreModule {}