File

projects/web-mev/src/app/core/local-storage/lcl-storage.service.ts

Description

Local storage service used for persist application data in observable key value pair

Extends

StorageService

Index

Properties
Methods

Constructor

constructor()

Methods

clear
clear()
Inherited from StorageService
Defined in StorageService:82

clear all available keys

Returns : void
get
get(key: string)
Inherited from StorageService
Defined in StorageService:43

get data of given key

Parameters :
Name Type Optional
key string No
Returns : any
remove
remove(key: string)
Inherited from StorageService
Defined in StorageService:71

remove given key

Parameters :
Name Type Optional
key string No
Returns : void
set
set(key: string, value: any)
Inherited from StorageService
Defined in StorageService:58

set value on given key

Parameters :
Name Type Optional
key string No
value any No
Returns : void
watch
watch(key: string)
Inherited from StorageService
Defined in StorageService:25

watch data of given key

Parameters :
Name Type Optional
key string No
Returns : Observable<any>

Properties

Private storage
Type : Storage
Inherited from StorageService
Defined in StorageService:8
Private subjects
Type : Map<string | BehaviorSubject<any>>
Inherited from StorageService
Defined in StorageService:9
import { Injectable } from '@angular/core';
import { StorageService } from './storage.service';

/**
 * Local storage service
 * used for persist application data in observable key value pair
 */
@Injectable({
  providedIn: 'root'
})
export class LclStorageService extends StorageService {
  constructor() {
    super(localStorage);
  }
}

result-matching ""

    No results matching ""