Why is the button click event fired despite it being disabled in Aurelia? -


i have following button want active (click enabled) when given condition met despite visually disabling button click event still fired when user clicks.

<button class="btn btn-default" click.delegate="dosomething()" type="submit" disabled.bind="true"></button> 

[update] changed false true mistakenly inserted wrong flag when cleaning example post here. question still valid.

you're binding disabled property value false, means attribute disabled not added button. if want button disabled, this:

<button class="btn btn-default" click.delegate="dosomething()" type="submit" disabled.bind="true"></button>


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -