How to use the @ngx-pwa/local-storage.StorageModule.forRoot function in @ngx-pwa/local-storage

To help you get started, we’ve selected a few @ngx-pwa/local-storage examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cyrilletuzi / angular-async-local-storage / projects / ivy / src / app / app.module.ts View on Github external
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { StorageModule } from '@ngx-pwa/local-storage';

import { AppComponent } from './app.component';

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    StorageModule.forRoot({
      IDBNoWrap: true,
    })
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
github cyrilletuzi / angular-async-local-storage / projects / localforage / src / app / app.module.ts View on Github external
import { NgModule } from '@angular/core';
import { StorageModule } from '@ngx-pwa/local-storage';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HomeComponent } from './home/home.component';

@NgModule({
  declarations: [
    AppComponent,
    HomeComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    StorageModule.forRoot({
      LSPrefix: 'localforage/',
      IDBDBName: 'localforage',
      IDBStoreName: 'keyvaluepairs'
    }),
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

@ngx-pwa/local-storage

Efficient local storage module for Angular: simple API based on native localStorage API, but internally stored via the asynchronous IndexedDB API for performance, and wrapped in RxJS observables to be homogeneous with other Angular modules.

MIT
Latest version published 6 months ago

Package Health Score

74 / 100
Full package analysis

Similar packages