2021-10-29 15:54:54 +01:00
|
|
|
import { Injectable } from '@angular/core';
|
|
|
|
|
|
|
|
|
|
@Injectable({
|
|
|
|
|
providedIn: 'root'
|
|
|
|
|
})
|
|
|
|
|
export class DataService {
|
2023-09-18 05:41:33 +01:00
|
|
|
public task: any;
|
2021-10-29 15:54:54 +01:00
|
|
|
|
2021-10-29 15:55:05 +01:00
|
|
|
|
2022-09-28 16:33:13 +01:00
|
|
|
data = {}
|
2021-10-29 15:54:54 +01:00
|
|
|
constructor() { }
|
2021-10-29 15:55:05 +01:00
|
|
|
|
|
|
|
|
set(name: string, value: any) {
|
|
|
|
|
this.data[name] = value
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-29 15:57:42 +01:00
|
|
|
get (name: string): any {
|
2021-10-29 15:55:05 +01:00
|
|
|
return this.data[name]
|
|
|
|
|
}
|
2021-10-29 15:57:42 +01:00
|
|
|
|
2023-09-19 10:21:23 +01:00
|
|
|
delate(name: string) {
|
|
|
|
|
delete this.data[name]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
clear() {
|
|
|
|
|
this.data = {}
|
|
|
|
|
}
|
2021-10-29 15:54:54 +01:00
|
|
|
}
|