You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Ember versions prior to 3.25 the usage of dynamic invocations for
helpers and modifiers did not work. Unfortunately, some versions of Ember
silently ignored additional arguments (3.16) wherease others throw a very
bizarre error (3.20) when you attempt to invoke what the rendering engine knows as a
dynamic value as if it were a helper.
For example, in versions of Ember prior to 3.25 the helper invocation here is impossible:
{{#if (this.someHelper)}}
Hi!
{{/if}}
This rule helps applications using Ember versions prior to 3.25 avoid these types of invocation.
Examples
This rule forbids the following:
{{! invoking a yielded block param as if it were a helper }}{{#letanythingas |blockParamValue|}}
<buttononclick={{blockParamValuesomeArgument}}></button>
{{/let}}
{{! invoking a path as if it were a helper }}
<Foodata-any-attribute={{this.anythingsomeArgument}} />
<Foodata-any-attribute={{some.other.pathsomeArgument}} />
{{! invoking a yielded block param as if it were a modifier }}{{#letanythingas |blockParamValue|}}
<Foo{{blockParamValue}} />
{{/let}}
{{! invoking a path as if it were a modifier }}
<Foo{{this.anything}} />
<Foo{{some.other.path}} />
This rule allows the following:
{{! use `fn` to wrap a function}}{{#letanythingas |blockParamValue|}}
<buttononclick={{fnblockParamValuesomeArgument}}></button>
{{/let}}
References
RFC's introducing this functionality in Ember > 3.25: