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
We're in the process of converting an app from lineman to ember-cli. We have a percent handlebars helper which works fine in lineman, but doesn't resolve in cli.
We define percent handlebars helper in app/helpers:
Attempting to use that helper results in this error:
Uncaught Error: <(subclass of Ember._MetamorphView):ember852> Handlebars error: Could not find property 'percent' on object {name: Cincinnati, utilization: 61.1}.
Changing the helper to per-cent fixes this issue. I think I've traced the cause of this issue, but I'm not sure how to fix it.
In ember-resolver/lib/core.js the extended Resolver's resolve method will call Ember's resolveHelper method.
As far as I can tell, due to this it's not possible to have ember-cli resolve a single word handlebars helper. Am I missing something? Thanks for the help!
The text was updated successfully, but these errors were encountered:
you are not missing anything, due to the ambiguity between bindable properties and helper names without a dash, we do not encourage the usage.
In addition, if we tried to resolve each potential property name we would slow ever ember app down to crawl, and it is likely impossible to introduce such a feature without massive caveats.
The way around this, if you really want a dashless helper, is it register the helper manually
We're in the process of converting an app from lineman to ember-cli. We have a
percent
handlebars helper which works fine in lineman, but doesn't resolve in cli.We define
percent
handlebars helper inapp/helpers
:Attempting to use that helper results in this error:
Changing the helper to
per-cent
fixes this issue. I think I've traced the cause of this issue, but I'm not sure how to fix it.In
ember-resolver/lib/core.js
the extended Resolver'sresolve
method will call Ember'sresolveHelper
method.Ember's
resolveHelper
method checks for the presence of a hyphen.As far as I can tell, due to this it's not possible to have ember-cli resolve a single word handlebars helper. Am I missing something? Thanks for the help!
The text was updated successfully, but these errors were encountered: