These are chat archives for canjs/canjs

15th
Jan 2016
Mihai Fantana
@fantanamihai
Jan 15 2016 14:11
@justinbmeyer, @pYr0x can you please explain why in the github realease, the code of steal/can/construct/construct.js (using eval) is different than that of amd/can/construct.js ?
Matthew Phillips
@matthewp
Jan 15 2016 14:14
how is it different?
Mihai Fantana
@fantanamihai
Jan 15 2016 14:15
This message was deleted
This message was deleted
in steal/can/construct/constuct.js we have
blob
blob
the latest is the amd/can/construct.js
in the steal version is an eval method
Mihai Fantana
@fantanamihai
Jan 15 2016 15:07
am I understood?
Matthew Phillips
@matthewp
Jan 15 2016 16:32
Not sure what i should be seeing
I don't see an eval
Kevin Phillips
@phillipskevin
Jan 15 2016 16:34
There’s one in the top image
eval(‘Constructor = function…
about halfway down
Matthew Phillips
@matthewp
Jan 15 2016 16:49
ah, ok
that is weird
I wonder if something is removing evals in the build
Adam L Barrett
@BigAB
Jan 15 2016 16:58
Is there a way using the REF * syntax, http://canjs.com/docs/can.view.bindings.reference.html, to export one property/attr value to the temlate scope, rather than just the whole view-model?
Matthew Phillips
@matthewp
Jan 15 2016 19:06
yep
1 sec
Julian
@pYr0x
Jan 15 2016 19:31
@BigAB yes you can... do you have an example which is not workng?
Matthew Phillips
@matthewp
Jan 15 2016 19:39
I think it is {^foo.bar}="*ref"
Justin Meyer
@justinbmeyer
Jan 15 2016 20:36
@matthewp that's it
Gregg Roemhildt
@roemhildtg
Jan 15 2016 20:36
Hi, I've run into an unexpected issue when using can.view with a custom component. The component works when using stealjs, and is rendered correctly, but when rendering using <script type="text/mustache" id="app-template">...</script> the attribute arguments are not passed to the viewModel and a strange message is logged. WARN: can/component: looks like you're trying to pass data-view-id as an attribute into a component, but it is not a supported attribute Is this the right place for questions like this?
Justin Meyer
@justinbmeyer
Jan 15 2016 20:37
@meconcomputer @phillipskevin @meconcomputer it's for debugging
if you are using a debugger and loading the dev version of things, can.Map shows up as Map
if you are using the prod version of things, it shows up as Constructor
we don't leave eval in our code in production :-)
Kevin Phillips
@phillipskevin
Jan 15 2016 20:38
makes sense
Justin Meyer
@justinbmeyer
Jan 15 2016 20:39
@roemhildtg hmmm, I'm not sure what is going on. Anyway you could create a JSBin with your example?
that has some examples to start from
if you think there's a bug, you can report it on github
make sure you include which version you are on
btw ... if you can, maybe switch to stache
Gregg Roemhildt
@roemhildtg
Jan 15 2016 20:42
Ah. So I guess this was somewhat obvious but I didn't realize that you can specify script type="text/stache" and was instead using "text/mustache". That immediately fixed the issue.
Justin Meyer
@justinbmeyer
Jan 15 2016 20:43
ah, nice
Gregg Roemhildt
@roemhildtg
Jan 15 2016 20:43
Thanks!
Justin Meyer
@justinbmeyer
Jan 15 2016 20:43
np
Mohamed Cherif Bouchelaghem
@cherifGsoul
Jan 15 2016 23:43
@justinbmeyer I opend the issue for the can-define default value problem