Bound handlebars helpers #1274

Merged
merged 1 commit into from Dec 14, 2012

Conversation

Projects
None yet
Member

ghempton commented Aug 15, 2012

This PR introduces Ember.Handlebars.registerBoundHelper.

This pull request passes (merged f61455c7 into a2caaa3).

Member

pangratz commented Aug 15, 2012

👍 Nice! Definitely useful!!

Owner

trek commented Aug 15, 2012

👍 I find myself need this often and am not happy with other patterns of getting transformed data into my views

Contributor

raycohen commented Aug 15, 2012

Looks great. I'd like to see specs that show it works with keywords and in nested contexts.

Owner

wagenet commented Aug 22, 2012

This looks really promising. Will have to review a bit more.

Owner

krisselden commented Aug 22, 2012

just quickly reviewing the code, it does not look like it would support keywords

Contributor

joliss commented Aug 28, 2012

As a workaround until this is merged, you can instantiate views in your helpers to the same effect: http://techblog.fundinggates.com/blog/2012/08/ember-handlebars-helpers-bound-and-unbound/

Member

ghempton commented Sep 4, 2012

@kselden, @raycohen, I just added support for keywords

This pull request passes (merged 505698e4 into 72b0f3d).

Member

ghempton commented Sep 4, 2012

@kselden I think another issue with this approach is a memory leak with the context. Any thoughts on how that could be cleaned up?

Member

ghempton commented Dec 10, 2012

I just updated this PR to use Ember._SimpleHandlebarsView per a conversation with @wycats and others.

Owner

trek commented Dec 10, 2012

ZOMG can we finally get this pulled in?

Any status update on this must-have feature?

Member

ghempton commented Dec 13, 2012

would be good to have @kselden take a look and comment

Owner

krisselden commented Dec 14, 2012

The dependentKeys feature isn't tested by any of the tests, otherwise looks good.

Owner

krisselden commented Dec 14, 2012

I was wrong, it is tested, just not in a way that makes the use case very clear.

krisselden added a commit that referenced this pull request Dec 14, 2012

@krisselden krisselden merged commit 4646983 into emberjs:master Dec 14, 2012

1 check passed

default The Travis build passed
Details

kurko commented Dec 14, 2012

Contributor

bestie commented Dec 14, 2012

👍

Owner

machty commented Dec 14, 2012

Yessssss <3

kmdsbng commented Dec 17, 2012

Great!

Contributor

dmzza commented Dec 17, 2012

👍

excellent !!

Contributor

josepjaume commented Jan 17, 2013

I'm trying to create a I18n helper with the following syntax:

{{t 'hello.world' nameBinding="name"}}

Am I wrong or this helper wouldn't keep track of changes in "name"? I know setting a property in the view bound to "name" would be pretty straightforward, but shouldn't this use case be considered in registerBoundHelper?

Owner

machty commented Jan 17, 2013

@josepjaume I'm going to try and address this for #1768

toUpperCase() is not the same as capitalize actually. And in this case, you could use directly capitalize() from http://emberjs.com/api/classes/Ember.String.html#method_capitalize

Am I missing something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment