javascript settimeout function in aurelia -


i want hide element after time ( 2 seconds ). in javascript in can use settimeout function that. there way use on aurelia? or there better way this?

you can hide element using if custom attribute included in aurelia. bind property on viewmodel.

this.showitem = true; window.settimeout(() => this.showitem = false, 2000); 
<h1 if.bind="showitem">i hide in 2 seconds</h1> 

Comments

Popular posts from this blog

python - RuntimeError: can't re-enter readline -

python - PyInstaller UAC not working in onefile mode -

php - Need to store a large amount of data in session with CI 3 but on storing large data in session it is itself destorying automatically -