0

Scenario
After clicking a button (Angular), I hide it. After a specified time, it appears again.

The problem is, if you reload the page it appears again, I want to save the time in the local storage and read the time from it, but I do not know how to do it.

https://angular-als5xa.stackblitz.io

Brian Smith
  • 1,467
  • 15
  • 31
Possum
  • 1
  • 1
  • Can you share the need to hide the button and show it again? Depending on the use case, there may be difference possible solutions. i.e. user submits a form, it would be better to disable the button and wait for an successful API call to re-enable it. – Brian Smith Jun 25 '21 at 14:21
  • Does this answer your question? [Save user object in Session Storage](https://stackoverflow.com/questions/41564204/save-user-object-in-session-storage) – tonythewest Jun 25 '21 at 14:37
  • The button brings up a modal window in which there is a questionnaire test. I don't want to let the user constantly fill it out or answer questions. My logic - if you just remove the button, the user will not see it and therefore will not be distracted and click on a button that is not active. Users are different and most will write that "something is wrong and does not work", so - just remove it. ))) – Possum Jun 25 '21 at 14:43
  • What are you using for your modal? It would be better to block clicks behind the modal while it is open, which is usually done by setting the backdrop to static. – Brian Smith Jun 25 '21 at 16:36

0 Answers0