Pass true or false to component?


Can you pass true or false directly into a component from a template?

passing “true” would pass the string value, not the boolean.

passing true would be interpreted as a variable or property defined in the component, and since it’s not defined, would pass in a bad value to the component.

^ the last paragraph is incorrect

The guides don’t address passing booleans directly. It seems silly to define a property named true in the controller just so that you can pass true in the template.

Is there another way, or is this actually it?


bool=true or bool=false is the way to go. Apparently {{false}} doesn’t work even if you have a controller with “false”: “hullo”.


since that’s exactly what i’m doing, I must be doing something else wrong,…