Compile Error if is not a modifier: Helpers may not be used in the element form


#1

I in my template the line below

<button class="button is-primary is-fullwidth" {{if isButtonDisabled "disabled"}} disabled={{isButtonDisabled}}>Activate Now</button>

I have the property isButtonDisabled set in my controller. But i keep getting the error:

ember.debug.js:26513 Error: Compile Error if is not a modifier: Helpers may not be used in the element form.
    at ember.debug.js:4760
    at Compilers.compile (ember.debug.js:4729)
    at compileStatement (ember.debug.js:4172)
    at ember.debug.js:3822
    at Array.forEach (<anonymous>)
    at WrappedBuilder.compile (ember.debug.js:3821)
    at ComponentLayoutBuilder.compile (ember.debug.js:3765)
    at compileLayout (ember.debug.js:3746)
    at Cache._emberMetal.Cache.owner [as func] (ember.debug.js:16336)
    at Cache.get (ember.debug.js:24925)

Ember CLI 2.14.1

Please what are mine doing wrong?


#2

It seems your if is wrong. See https://guides.emberjs.com/v2.14.0/templates/conditionals/