I want to make a timeout for my Angular 2+ Application . Actually,i want after some time like 20 minutes localtorage got cleared .
Thanks
I want to make a timeout for my Angular 2+ Application . Actually,i want after some time like 20 minutes localtorage got cleared .
Thanks
You can write setTimeout function with in ngOnInit.
ngOnInit(){
setTimeout(()=>{
localStorage.clear();
},time)
}