@webacad/ng-store
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

NPM version Build Status

WebACAD/NgStore

Store wrapper for angular.

Dependencies

  • @angular/core
  • store

Installation

$ npm install --save @webacad/ng-store

or with yarn

$ yarn add @webacad/ng-store

Register the module

import {NgModule} from '@angular/core';
import {NgStoreModule} from '@webacad/ng-store';

@NgModule({
    imports: [
        NgStoreModule,
    ],
})
export class AppModule {}

Usage

Simply inject the NgStore service into your class:

import {NgStore} from '@webacad/ng-store';

export class AuthService
{
    
    constructor(
        private $store: NgStore,
    ) {}
    
}

Available methods:

  • get(key, default): Returns the value from store
  • set(key, value): Store a new value
  • remove(key): Remove value from the store

/@webacad/ng-store/

    Package Sidebar

    Install

    npm i @webacad/ng-store

    Weekly Downloads

    5

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    30.5 kB

    Total Files

    24

    Last publish

    Collaborators

    • davidkcz