Skip to content
This repository was archived by the owner on Apr 4, 2019. It is now read-only.

fixes emberjs/ember.js#12506 #448

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Saranya-Raaj
Copy link
Contributor

@rwjblue
Copy link
Collaborator

rwjblue commented Feb 3, 2016

This seems correct to me.

@mixonic / @mmun - Any objections?

@stefanpenner
Copy link
Collaborator

we should be careful about perf

@chadhietala
Copy link
Collaborator

I second Stef's concern, get can be called a pretty significant amount of times.
screen shot 2016-02-02 at 11 45 29 pm

@mmun
Copy link
Collaborator

mmun commented Feb 21, 2016

We already lookup helpers for curlies that appear outside of attributes: https://github.com/tildeio/htmlbars/blob/master/packages/htmlbars-runtime/lib/hooks.js#L698. Doing it for attributes as well is the correct thing to do.

That said, I don't like this particular implementation. get should not be looking up helpers.
In {{foo bar}}, bar is never a helper, but with this implementation we would be checking if it was. Instead, we should add an ambiguous hook that delegates get or subexpr depending on whether the path resolves to a helper or not. The ambiguous hook would be called whenever there was a {{foo}} in the template (whether in content or in an attribute). {{foo.bar}} should not trigger the ambiguous hook however.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parameter-less helper calls don't work inside of attributes
5 participants