src/app/test-controller/utils/local-storage.util.ts
Properties |
|
Methods |
|
Static localStorageTestKey |
Type : string
|
Default value : 'iqb-tc-t'
|
Static getTestId |
getTestId()
|
Returns :
string
|
Static removeTestId |
removeTestId()
|
Returns :
void
|
Static setTestId | ||||||
setTestId(testId: string)
|
||||||
Parameters :
Returns :
void
|
export class LocalStorage {
static localStorageTestKey = 'iqb-tc-t';
static setTestId(testId: string): void {
localStorage.setItem(LocalStorage.localStorageTestKey, testId);
}
static removeTestId(): void {
localStorage.removeItem(LocalStorage.localStorageTestKey);
}
static getTestId(): string {
return localStorage.getItem(LocalStorage.localStorageTestKey);
}
}