import { Injectable } from '@angular/core' ; @ Injectable ( { providedIn : 'root' } ) export class LocalStorageService { constructor ( ) { } set ( key , data ) { localStorage . setItem ( key , data ) ; } remove ( key ) { localStorage . removeItem ( key ) ; } get ( key ) { return localStorage . getItem ( key ) ; } setToken ( token ) { localStorage . setItem ( "token" , token ) ; } removeToken ( ) { localStorage . removeItem ( "token" ) ; } getToken ( ) { return localStorage . getItem ( "token" ) ; } }