These are chat archives for canjs/canjs

14th
Dec 2015
Jeroen Cornelissen
@jeroencornelissen
Dec 14 2015 13:41
I have an each loop inside an each loop, is it possible to send the first object and second object to a helper function?
{{#each pupils}}    
    {{#each skills}}
        {{getCellContent pupil .}}
    {{/each}}
{{/each}}
Kevin Phillips
@phillipskevin
Dec 14 2015 15:16
can you use .. ?
I know you can use it for single properties, not sure if it will give the entire object
Guido Smeets
@gsmeets
Dec 14 2015 15:44
Yeah, you can do that.
But maybe a component makes more sense than a helper in this case
Jeroen Cornelissen
@jeroencornelissen
Dec 14 2015 15:50
@gsmeets How would you fit in a component?
I had to make a quick fix and rewrite a legacy EJS file to stache. I’ll try the .. next time, for now I solved it with passing the skills to my helper and do the loop inside the helper {{getCellContent . skills}}
Kevin Phillips
@phillipskevin
Dec 14 2015 15:52
you could just pass each pupil to a new component like <pupil-skills {(pupil)}=“.” />
Kevin Phillips
@phillipskevin
Dec 14 2015 17:55
I have a template that uses {{@index + 2}} for creating class names, when I change that to the new %index it doesn’t work the same way
is this a bug? or is this not intended to work?
the right-most column of the output is not showing what I would expect
Matthew Phillips
@matthewp
Dec 14 2015 17:58
search the issues, I seem to recall some %index bugs
Kevin Phillips
@phillipskevin
Dec 14 2015 17:59
ok, will do
Kevin Phillips
@phillipskevin
Dec 14 2015 18:04
I don’t see any. I’ll open one.