Using SQLite

Hi,

I need to use sqlite or tinydb in my project and don’t know how to use it.

I need to save the data and show it from the database
I now have this code

ngOnInit(){
    this.newsProvider.getnewsbycat().subscribe(
      data=>{
        console.log(data);
        
        this.articles = data;
      }, error => {
        console.log(error);
      }
    )
  }

why do you need especially sqlite?

tried Angular App Data Storage Options - Ionic Documentation yet?

Because someone told me that

First of all don’t use Localstorage, the device of the user deletes it, when it needs more space, so the user could be logged out

Ok, I see, I was that guy.:man_facepalming:
We are comunication over two threads…

1 Like

Check the docs on Storage how to use sqlite

Works fine and no issue with localstorage

Just to be clear, https://ionicframework.com/docs/storage/ is NOT the same as LocalStorage.