JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 4
  • Score
    100M100P100Q36654F
  • License MIT

Package Exports

  • cdl-localstorage

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cdl-localstorage) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Localstorage

This is a simple local storage which is developed using javascript.

Installation instruction

npm install cdl-localstorage --save

Instruction to use the package

How to use?

Please follow below instruction to implement local storage in your angular application.

//in module
import { LocalstorageModule } from 'cdl-localstorage'; 

imports: [
    LocalstorageModule
]

// In your component ts file

import { LocalstorageService } from 'cdl-localstorage';

// Extend service to utilize its functions

export class AppComponent extends LocalstorageService {

    constructor() {
        super();
    }

    ngOnInit() {

        //Set value in local storage by key value pair
        this.setValue(key, value);

        //Get value from local storage by key
        this.getValue(key);

        //Clear specific value in local storage by key
        this.clearValue(key);

        //Clear entire local storage
        this.clearAll();
    }
}