hi where can i find logout logic to clear database for example i added an item to my table this item store in local storage i want when logout and login again with same user to clear this local storage so how can i did it ? i attached simple video to see what i want to do thank you
https://streamable.com/4l44ba
- ABP Framework version: v8.0.2
- UI Type: Angular
- Database System: EF Core (SQL Server)
8 Answer(s)
-
0
Hello ,
When the logout event is triggered, use JavaScript's
localStorage.clear()method to remove all items from the local storage. Please try this once.Thank you.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hello ,
Please try to this code in
app.component.tsfile. eg:-import { Component } from '@angular/core'; import { OAuthService } from 'angular-oauth2-oidc'; import { filter } from 'rxjs'; @Component({ selector: 'app-root', }) export class AppComponent { constructor(private oAuthService: OAuthService) { this.oAuthService.events .pipe(filter((event) => event?.type === 'logout')) .subscribe((event) => { // logout event fired localStorage.clear(); }); } }When i click on logut button debugger was hit

Thank you,
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
Hello,
At my side its work there is nothing any issue check here.
You can refer this document https://abp.io/docs/8.2/tutorials/book-store/part-02?UI=NG&DB=EF if it is helpful for you.
Thank you.
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
i solved it thank you
Great : )
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)




