Let's say there's this div in the code:
<div [hidden]="!isNotificationDisplayed" class="notification">
<h2 align="center" class="set-margin" #notification>Node was...!</h2>
<h4 align="center">Press 'Space' to hide it</h4>
</div>
The variable isNotificationDisplayed determines whether the div is displayed (true) or not (false). It is initially set to false, meaning the div is hidden. I want to create a function that changes the value to true for 3 seconds, showing the div for that duration before setting it back to false.