Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registerSimpleHelper #1102

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

registerSimpleHelper #1102

justinbmeyer opened this issue Jun 19, 2014 · 3 comments
Milestone

Comments

@justinbmeyer
Copy link
Contributor

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
Copy link
Contributor

zkat commented Nov 25, 2014

+1

@zkat
Copy link
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
Copy link
Contributor

daffl commented Oct 22, 2015

This is included in 2.3.

@daffl daffl closed this as completed Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants