Support for bound handlebars helpers #615

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
@ghempton
Member

ghempton commented Mar 24, 2012

This is my first attempt at adding a convenient way to create bound handlebars helpers. Bound handlebars helpers can now be created as follows:

  Ember.Handlebars.registerBoundHelper('capitalize', function(value) {
    return value.toUpperCase();
  });

Would love some feedback as to how this could be cleaned up.

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Mar 26, 2012

Member

This is based on the BoundProperty stuff I did right? If so, and if we merge this, should we change basic property bindings to use this as well?

Member

wagenet commented Mar 26, 2012

This is based on the BoundProperty stuff I did right? If so, and if we merge this, should we change basic property bindings to use this as well?

@smadep

This comment has been minimized.

Show comment
Hide comment
@smadep

smadep Mar 31, 2012

would this support bidirectional binding?!

smadep commented Mar 31, 2012

would this support bidirectional binding?!

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Mar 31, 2012

Member

@smadep No. If you want to bind to the DOM you have to do some extra work. As an example, the TextSupport mixin handle this for TextField and TextArea: https://github.com/emberjs/ember.js/blob/master/packages/ember-handlebars/lib/controls/text_support.js

Member

wagenet commented Mar 31, 2012

@smadep No. If you want to bind to the DOM you have to do some extra work. As an example, the TextSupport mixin handle this for TextField and TextArea: https://github.com/emberjs/ember.js/blob/master/packages/ember-handlebars/lib/controls/text_support.js

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Jun 21, 2012

Member

@ghempton I think it would definitely be useful to get something like this in core. However, I know there was some concern from @wycats about the way rendering is handled here. @wycats, any more thoughts on the matter?

Member

wagenet commented Jun 21, 2012

@ghempton I think it would definitely be useful to get something like this in core. However, I know there was some concern from @wycats about the way rendering is handled here. @wycats, any more thoughts on the matter?

@trek

This comment has been minimized.

Show comment
Hide comment
@trek

trek Jul 6, 2012

Member

this isn't on the 1.0 milestone, but probably should be.

Member

trek commented Jul 6, 2012

this isn't on the 1.0 milestone, but probably should be.

@nhoffmann

This comment has been minimized.

Show comment
Hide comment
@nhoffmann

nhoffmann Jul 25, 2012

+1 for putting this on the 1.0 milestone

+1 for putting this on the 1.0 milestone

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Jul 25, 2012

Member

@nhoffmann Already there :)

Member

wagenet commented Jul 25, 2012

@nhoffmann Already there :)

@ghempton

This comment has been minimized.

Show comment
Hide comment
@ghempton

ghempton Aug 4, 2012

Member

I'd be happy to take another pass on this. What is the desired implementation? I think @wycats was wanting to reuse the code path from {{bind}}, but I'm wary of making Ember._HandlebarsBoundView more complex.

Member

ghempton commented Aug 4, 2012

I'd be happy to take another pass on this. What is the desired implementation? I think @wycats was wanting to reuse the code path from {{bind}}, but I'm wary of making Ember._HandlebarsBoundView more complex.

@ghempton ghempton referenced this pull request Aug 15, 2012

Merged

Bound handlebars helpers #1274

@wagenet

This comment has been minimized.

Show comment
Hide comment
@wagenet

wagenet Oct 8, 2012

Member

Closing in favor of #1274,

Member

wagenet commented Oct 8, 2012

Closing in favor of #1274,

@wagenet wagenet closed this Oct 8, 2012

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