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

interpolating view methods with args #103

Closed
ianstormtaylor opened this issue Oct 17, 2013 · 3 comments
Closed

interpolating view methods with args #103

ianstormtaylor opened this issue Oct 17, 2013 · 3 comments

Comments

@ianstormtaylor
Copy link
Contributor

in a simple view like this:

<input name="username" value="{ query('username') }">

where the view has a helper like this:

View.prototype.query = function (key) {
  var query = querystring.parse(location.search);
  return query[key];
};

i'd expect that interpolation to work, but because of this line it seems like its only checking the model for function calls inside interpolation. is this a feature or just view support hasnt been added yet? i can hopefully add it if so

@tj
Copy link
Member

tj commented Nov 3, 2013

I forget where I left off with that stuff haha I know it's inconsistent right now with how interp and non-interp stuff is handled but that should definitely work

@defunctzombie
Copy link
Contributor

This would be great to have especially now that I removed formatters for reactive 1.0 tho still trying to come up with a good example usecase for this that isn't already handled

@defunctzombie
Copy link
Contributor

Duplicate of #76

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

No branches or pull requests

3 participants