0.1.0 • Published 12 months ago

@pscoped/ng2-cache v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

ng2-cache

ng2-cache library compatible with AoT compilation & Tree shaking like an official package.

This lib allows you to use ng2-cache library for Angular v19+ apps written in TypeScript, ES6 or ES5.

How to use

  1. npm install @pscoped/ng2-cache --save
  2. Import it in your main app module

    @NgModule({
    declarations: [
        ....
    ],
    imports: [
        ....
        Ng2CacheModule
    ],
    providers: [],
    bootstrap: [AppComponent]
    })
    export class AppModule { }
  3. Use it inside your Component by DI

    ````
    ...
    import { CacheService, CacheStoragesEnum } from 'ng2-cache';
    ...
    
    export class AppComponent {
    
    constructor(private _cacheService: CacheService) { 
        this._cacheService.set('key', ['some data']);
    
        const cachedData = this._cacheService.get('key');
    } 
    ````

    That's it.

To contribute

Run tasks

To create a production bundle:

npm run build

License

MIT

0.1.0

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago