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
Post a Comment