These are chat archives for angular/angular-2-ionic-2

14th
May 2018
LalitKushwah
@LalitKushwah
May 14 2018 09:12
Hello Everyone,
I am studying about the storage module available in ionic and don't understand the driver mechanism. I have the following queries:
  1. What is driver in storage module
  2. How does it mean by sequence
  3. Is SQLite available in browser if yes how can I see it
Owen Melbourne
@OwenMelbz
May 14 2018 09:54
@LalitKushwah theres no universal system that works with all platforms, you have to write code for each platform to save to, e.g localstorage/appcahe/other things for browsers
UncertaintyP
@UncertaintyP
May 14 2018 10:30
@LalitKushwah As you can see from the configuration example at Ionic you can set driverOrder: ['indexeddb', 'sqlite', 'websql'] it then tries each driver and if not available uses the next one.
In the browser you cant use sqlite but (at least in chrome and I guess safari?) websql. In chrome you can inspect it in DevConsole -> Application > Storage -> Web SQL
UncertaintyP
@UncertaintyP
May 14 2018 10:36
So in contrast to :point_up: May 14, 2018 11:54 AM Ionic Storage provides a universal API for a simple key-value store on all platforms (if you use the necessary drivers of course)
LalitKushwah
@LalitKushwah
May 14 2018 11:19
@UncertaintyP so why 'sqlite' is mentioned in the driver list if it is not available in browser
??
UncertaintyP
@UncertaintyP
May 14 2018 11:21
Because you can use it on device
LalitKushwah
@LalitKushwah
May 14 2018 11:21
Okay
Thanks @UncertaintyP
Have you worked around the pouchdb with ionic
?
UncertaintyP
@UncertaintyP
May 14 2018 11:22
No
LalitKushwah
@LalitKushwah
May 14 2018 11:22
Okay
I am working on an e-commerce application and writing a shopping cart code from scratch
so that's why I want to make everything neat and clean
BTW Thanks for quick response