registerSimpleHelper #1102

Closed
justinbmeyer opened this Issue Jun 19, 2014 · 3 comments

Comments

Projects
None yet
3 participants
@justinbmeyer
Contributor

justinbmeyer commented Jun 19, 2014

We should support a simple helper so people don't have to check if helper arguments are a compute. For example, a nice link helper could be written like:

can.stache.registerSimpleHelper("link", function(name,options){

  return can.stache.safeString( can.route.link(name,options.hash) );
});

registerSimpleHelper would simply register another helper, but would make sure all the arguments and options.hash that are computes are converted to their normal value.

@justinbmeyer justinbmeyer added this to the 2.2.0 milestone Aug 26, 2014

@zkat

This comment has been minimized.

Show comment
Hide comment
@zkat

zkat Nov 25, 2014

Contributor

+1

Contributor

zkat commented Nov 25, 2014

+1

@zkat

This comment has been minimized.

Show comment
Hide comment
@zkat

zkat Nov 26, 2014

Contributor

i think this should become the default behavior for helpers. As described, this feature would still force users to check for computes when you define helpers right in a can.stache() call, or in the helpers object of can.Component.

Contributor

zkat commented Nov 26, 2014

i think this should become the default behavior for helpers. As described, this feature would still force users to check for computes when you define helpers right in a can.stache() call, or in the helpers object of can.Component.

@daffl daffl modified the milestones: 2.3.0, 2.2.0 Jan 10, 2015

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Oct 22, 2015

Contributor

This is included in 2.3.

Contributor

daffl commented Oct 22, 2015

This is included in 2.3.

@daffl daffl closed this Oct 22, 2015

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