These are chat archives for canjs/canjs

29th
Jun 2015
opolyo01
@opolyo01
Jun 29 2015 18:07
is stache passes index while iterating over collection or I need to write a helper?
in handlebars I would do this -- tabindex='{{@index}}'
getting NaN with stache
dylanrtt
@dylanrtt
Jun 29 2015 18:09
@opolyo01 that should work. perhaps you are iterating over an object instead of a list/array in which case you probably want @key
opolyo01
@opolyo01
Jun 29 2015 18:12
nope {{#dimensionList}} .. {{/dimensionList}}
dimensionList --> Array
is it even documented anywhere? http://canjs.com/docs/can.stache.html
I am fiddling with it now and it seems that sometimes I do also get NaN
Chris Gomez
@akagomez
Jun 29 2015 18:14
@opolyo01 I can get it to work with the {{#each}}helper: http://jsbin.com/warebexisa/edit?html,js,output
opolyo01
@opolyo01
Jun 29 2015 18:15
yep, each works
dylanrtt
@dylanrtt
Jun 29 2015 18:17
oh right, I think it is only supposed to work with #each, not with {{#list}}{{/list}}
opolyo01
@opolyo01
Jun 29 2015 18:17
ok now please remind me the difference of each vs {{#list}}.. I remember one of them is less efficient
Chris Gomez
@akagomez
Jun 29 2015 18:17
I tend to steer clear of the {{#block}} helper anyway. It re-renders the entire list on change vs the {{#each}} helper which makes the fewest # of DOM manipulations necessary for each add or remove.
Adam L Barrett
@BigAB
Jun 29 2015 19:42
Where is the best place to put animation type code, like sweeping-in, rolling-out type stuff, in a can-component? The viewModel seems the wrong place. The Events object also seems wrong... so what is the right place? (the-can-way)
dylanrtt
@dylanrtt
Jun 29 2015 19:49
@BigAB the can.view.attr page shows making a fade-in-when="{prop}" attribute. you could probably apply the same principle to other animations
http://canjs.com/docs/can.view.attr.html#section_Readingvaluesfromthescope_
Adam L Barrett
@BigAB
Jun 29 2015 19:57
@dylanrtt thanks
Julian
@pYr0x
Jun 29 2015 21:17
canjs can connect meetup?
or i am too late
Adam L Barrett
@BigAB
Jun 29 2015 21:29
@pYr0x got cancelled
Julian
@pYr0x
Jun 29 2015 21:30
?
why?
Adam L Barrett
@BigAB
Jun 29 2015 21:31
Justins wife had a baby
Julian
@pYr0x
Jun 29 2015 21:32
ohh
gratulation ;)