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

4x4 Matrix in Python -

python - String indices must be integers and while issue -

python - PyInstaller UAC not working in onefile mode -