Warning
Angular version 6 is officially outdated, so this version is not supported anymore.
If you come from the old angular-async-local-storage
package, you will need to migrate to the new @ngx-pwa/local-storage
package first before upgrading to v6.
For shorter code and more consistency, the Async
prefix has been dropped everywhere.
You can easily and quickly migrate by doing a global search/replace of:
AsyncLocalStorage
=>LocalStorage
AsyncLocalDatabase
=>LocalDatabase
ALSGetItemOptions
=>LSGetItemOptions
In most cases, you are probably only using the first one.
LocalStorageModule
is no longer needed and so it is removed. Services are provided directly when injected in Angular >=6.
Just delete the LocalStorageModule
import in your AppModule
.
Done.