import { DirtyCheckPlugin } from '@datorama/akita';
export class WidgetsComponent {
dirtyCheck: DirtyCheckPlugin;
constructor(private widgetsQuery: WidgetsQuery) {}
ngOnInit() {
this.widgets$ = this.widgetsQuery.selectAll();
this.dirtyCheck = new DirtyCheckPlugin(this.widgetsQuery).setHead();
}
updateWidget(id: ID, name: string) {
this.widgetService.updateWidget(id, name);
}
reset() {
this.dirtyCheck.reset();
}
ngOnDestroy() {
this.dirtyCheck.destroy();
}
}