Noodles Practicing Medicine
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@webacad/ng-store

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

Keywords

Install

npm i @webacad/ng-store

DownloadsWeekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

30.5 kB

Total Files

24

Last publish

Collaborators

  • avatar