import { Injectable } from '@angular/core';


@Injectable()
export class LocalStorageService {

  constructor() {}

  public setLocalStorageData(name, data) {
    localStorage.setItem(name, '');
    localStorage.setItem(name, JSON.stringify(data));
  }

  public getLocalStorageData(name) {
    return JSON.parse(localStorage.getItem(name));
  }

}
