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

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -