Closed splincode closed 3 years ago
Ohh, great)) you are awesome
What do you think about that is, we could develop adapters in this plugin, with good support
import { NGXS_DATA_ASYNC_STORAGE_PLUGIN } from '@ngxs-labs/data/async-storage';
NgxsDataPluginModule.forRoot([
NGXS_DATA_ASYNC_STORAGE_PLUGIN,
NGXS_DATA_STORAGE_PLUGIN
])
instead NgxsAsyncStoragePluginModule
You could contribute and send PR )
hi, do you have any plans for this?
I was able to manage our own storage service that provides functionality to support async storage with the help of StorageMap library that use IndexedDb and AsyncStorageEngine.
Install StorageMap .
Install AsyncStorageEngine
Create a new storage service and implement AsyncStorageEngine with missing members like this:
In your app.module.ts, configure your NgxsModule and other packages like this:
In your state class, add the following decorators:
Et voilà! You can now use your async StorageService with NGXS!