These are chat archives for canjs/canjs

17th
Aug 2018
Thomas Sieverding
@Bajix
Aug 17 2018 07:45
Hmm I thought it used to be the case that you could set properties on components that correlate w/ viewModel propertys that have htmlbool in order to set true. Like <my-component bar/>. This doesn’t work anymore?? Is there anything shorter than <my-component bar:from=“‘true’”/>?
Ivo Pinheiro
@ivospinheiro
Aug 17 2018 09:13

@Bajix
You could use:
<my-component bar:raw="true"/>
Please check:
https://canjs.com/doc/can-stache-bindings.raw.html

Is that what you're looking for?

Justin Meyer
@justinbmeyer
Aug 17 2018 13:59
@Bajix yeah, we removed that in 4.0 because it caused a lot of confusion for people when they would do something like aria-X="value" and suddenly that was a property on a component
raw is the substitute
(thanks @ivospinheiro for the tip!)
Ivo Pinheiro
@ivospinheiro
Aug 17 2018 14:04
You're welcome ;-)
I had a similar question a few days ago and @roemhildtg has helped me.
Justin Meyer
@justinbmeyer
Aug 17 2018 14:05
nice, thanks @roemhildtg for being the grandfather of this assist
Matthew Phillips
@matthewp
Aug 17 2018 15:33
Thomas Sieverding
@Bajix
Aug 17 2018 20:20
@ivospinheiro @justinbmeyer Thanks! That change makes sense. It looks like I can do type:htmlbool and make this work w/ just bar:raw so that’s still reasonably short