The following can be handled by ng update
:
NgForageModule
has been removed. provideDEFAULT_CONFIG
instead if you were usingforRoot
:
import {DEFAULT_CONFIG, NgForageOptions} from 'ngforage';
@NgModule({
providers: [
{
provide: DEFAULT_CONFIG,
useValue: {
name: 'foo',
cacheTime: 300000
} as NgForageOptions
}
]
})
export class AppModule {}
No migration steps needed
sessionStorage support was dropped from ngforage. If you require sessionStorage you can use the localforage-driver-session-storage package and define the driver in either localforage or ngforage.
Driver name constants were previously part of the NgForageConfig
class. They have now been moved
to their own separate enum:
import {Driver, NgForage} from 'ngforage';
class MyService {
public constructor(ngf: NgForage) {
ngf.configure({
driver: [
Driver.INDEXED_DB,
Driver.LOCAL_STORAGE
]
})
}
}