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

Already on GitHub? Sign in to your account

No parentheses in tag attribute javascript code. #163

Closed
sbking opened this Issue Apr 8, 2013 · 2 comments

Comments

Projects
None yet
2 participants

sbking commented Apr 8, 2013

I'd like to be able to call a function with an argument from within an element's attribute definitions. This would greatly simplify my controller code for my forms. Is there any way to get around this limitation?

sbking commented Apr 9, 2013

Actually, I guess it makes more sense to move all the function calls that I want to expose to my views into an object.

Owner

bminer commented Apr 9, 2013

Unfortunately, this would make the parser a bit more complicated (and a bit slower) because it would have to keep track of opening/closing parentheses.

As a workaround, call your functions in advance, storing the values in variables / view locals. Then, plug those in as the attribute values. I'm sure you're probably doing this already...

Closing this issue for now. Thanks.

@bminer bminer closed this Apr 9, 2013

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