ngx-local-cache
v0.0.6
Published
> Build your own angular secured storage just in 2 minutes !
Downloads
4
Readme
ngx-local-cache
Build your own angular secured storage just in 2 minutes !
This plugin have built in encryptor when you save anything to local storage, so stay secured !
Just 2 Steps to perform
- Install library
- Import , Use and enjoy
Installation
Angular 6+ (I not tried for previous version - try your luck)
Install the dependencies and devDependencies and start the server.
$ npm i crypto-js ngx-local-cache --save
....
import { NgxLocalCacheModule } from 'ngx-mqtt-chat';
....
Inside app module.ts
imports: [
...
NgxLocalCacheModule
...
],
Inside component where you want to use this
import { NgxLocalCacheService } from 'ngx-local-cache';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss']
})
export class AppComponent {
title = 'mbp';
constructor(ngxLocalCache: NgxLocalCacheService) {
ngxLocalCache.saveData("Hello", "Bhushan")
console.log(ngxLocalCache.getData("Hello"));
ngxLocalCache.deleteData("Hello");
console.log(ngxLocalCache.getData("Hello"));
//explore more options
}
}
Plugins
We are extending below plugins
| Plugin | README | | ------ | ------ | | crypto-js | [https://www.npmjs.com/package/crypto-js]
License
MIT Free Software, Hell Yeah!