File

src/app/test-controller/utils/local-storage.util.ts

Index

Properties
Methods

Properties

Static localStorageTestKey
Type : string
Default value : 'iqb-tc-t'

Methods

Static getTestId
getTestId()
Returns : string
Static removeTestId
removeTestId()
Returns : void
Static setTestId
setTestId(testId: string)
Parameters :
Name Type Optional
testId string No
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);
  }
}

results matching ""

    No results matching ""