Skip to content

Boolean attributes compile to strings #138

Answered by joshdcuneo
joshdcuneo asked this question in Q&A
Discussion options

You must be logged in to vote

To answer myself, while it might be possible to handle this at compile time for a static attribute as in the example, it would not work with assigns as temple is compiled away and eex doesn't handle it either. Options seem to be use content_tag or disabled the button client side (with hooks in a LiveView if needed).

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by joshdcuneo
Comment options

You must be logged in to vote
1 reply
@eahanson
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants