These are chat archives for canjs/canjs

5th
Jun 2018
Gregg Roemhildt
@roemhildtg
Jun 05 2018 14:52
Hey @chasenlehara yeah that works! I didn't realize you could pass this an object to assign to the viewmodel.
cc @cherifGsoul basically I wanted to do this: <component this:from="propsObject" /> and have the component viewmodel get updated like viewModel.assign(propsObject);
RyanMilligan
@RyanMilligan
Jun 05 2018 16:08
@justinbmeyer yeah, it'll definitely be a behavior. I'll send it to you as a gist or something once it's ready. Thanks for the advice.
Side question: is the isSaving() function just for display in the UI, or is it important to the pipeline?
Eben
@eben-roux
Jun 05 2018 16:12
I'm getting &#65279; in my html
Does anyone know if this ia some known issue with canjs?
It is quite possibly something else like webstorm or some such... or something in my stache but thought I'd ask if anyone has experience this by any chance
Gregg Roemhildt
@roemhildtg
Jun 05 2018 16:29
@chasenlehara The only issue is can-stache-bindings.js:52 Uncaught Error: can-stache-bindings - you can not have contextual bindings ( this:from='value' ) and key bindings ( prop:from='value' ) on one element.
Mohamed Cherif Bouchelaghem
@cherifGsoul
Jun 05 2018 17:00
@roemhildtg the jsbin I shared shows onther approach with can-view-callbacks attr
Justin Meyer
@justinbmeyer
Jun 05 2018 18:13
@RyanMilligan I've only ever used it for display purposes
to prevent buttons and such from being clicked on while the save is happening
Chasen Le Hara
@chasenlehara
Jun 05 2018 18:15
@roemhildtg Correct, anything you want passed to the component should be done through this:from (otherwise there’d be a bunch of weird cases… what would happen if they conflicted?)
@eben-roux Not a known issue with CanJS. It’s most likely in your template… maybe copy + pasted from somewhere? Some other weird encoding issue?
Gregg Roemhildt
@roemhildtg
Jun 05 2018 21:04
@chasenlehara yes, there could be conflicts passing data in to the component