File

src/storage.service.ts

Methods

setItem
setItem(key: any, value: any)
Returns : any
getItem
getItem(key: any)
Returns : any
removeItem
removeItem(key: any)
Returns : any
import { Injectable } from '@angular/core';

@Injectable()
export class LocalStorageService {

  setItem(key: any, value: any) : any {
    localStorage.setItem(key, value);
  }

  getItem(key: any): any {
    return localStorage.getItem(key);

  }

  removeItem(key: any): any {
    localStorage.removeItem(key);
  }

}

results matching ""

    No results matching ""