|
public savedProperties: any; // need to maintain this in DB
public resetProperties: object;
saveState() {
// Store the persistec data in the global variable
this.savedProperties = JSON.parse(
(this.scheduleObj as any).getPersistData()
);
this.resetProperties = this.savedProperties;
}
setState() {
// Restore the persisted data to the Schedule from global variable
if (this.resetProperties) {
this.scheduleObj.selectedDate = new Date(this.savedProperties.selectedDate);
this.scheduleObj.currentView = this.savedProperties.currentView;
}
} |