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

No parentheses in tag attribute javascript code. #163

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

No parentheses in tag attribute javascript code. #163

sbking opened this issue Apr 8, 2013 · 2 comments

Comments

@sbking
Copy link

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

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.

@bminer
Copy link
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 as completed Apr 9, 2013
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

2 participants