@dvs-angular/storage
v0.0.7
Published
## Usage
Downloads
10
Readme
Angular Components - Storage
Usage
in
app.module
import { StorageModule, Storage, LocalStorage } from '@dvs-angular/storage';
provide your favorite storage (
LocalStorage
,CookiesStorage
orInMemoryStorage
)
providers: [
...
{
provide: Storage,
useExisting: LocalStorage
},
...
]
*if you like different provider, don't forget to import it instead of LocalStorage
- now you can inject
Storage
and use methods from interface:
has(key: string): boolean;
get(key: string): any;
set(key: string, value: any): void;
delete(key: string): void;