cyrilletuzi / angular-async-local-storage

Efficient client-side storage for Angular: simple API + performance + Observables + validation
MIT License
675 stars 68 forks source link

delete and clear not working properly! #999

Closed AbozahraOsama closed 1 year ago

AbozahraOsama commented 1 year ago

I want to run some code after deleting an entry from the storage, I have used this code to simulate logging user out then redirect the user to login screen. and in the team-login screen I check for the credentials entry if it is exists I automatically logging the user back in, so it keeps redirecting to team-login then logging back in.

  logout() {
    this.storage.delete('credentials')
      .subscribe(() => {
        // here credentials still in the database
        this.router.navigate(['team-login'])
      });
  }
cyrilletuzi commented 1 year ago

Hi, as you can imagine, .delete() being part of the core API of this library, it is already tested. And given you did not respect the issue template and you provided no reproduction of the issue, I am totally unable to help you.

So I am closing this issue. If it is still here, please open a new issue and fill the information asked in the issue template, and provide a reproduction.