mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
30 lines
387 B
TypeScript
30 lines
387 B
TypeScript
import { Injectable } from '@angular/core';
|
|
|
|
@Injectable({
|
|
providedIn: 'root'
|
|
})
|
|
export class DataService {
|
|
public task: any;
|
|
|
|
|
|
data = {}
|
|
constructor() { }
|
|
|
|
set(name: string, value: any) {
|
|
this.data[name] = value
|
|
}
|
|
|
|
get (name: string): any {
|
|
return this.data[name]
|
|
}
|
|
|
|
delate(name: string) {
|
|
delete this.data[name]
|
|
}
|
|
|
|
|
|
clear() {
|
|
this.data = {}
|
|
}
|
|
}
|