Repeat.for using range

So just in follow-up here, I did end up moving to a 1d array as suggested, and due to the puzzle generator I ended up using did also.

I also worked around my OP issue by using a value converter to create the css class variable I needed.
Again, Aurelia super simplified it.

        <template repeat.for="cell of sudoku">
            <cell class="cell-${$index | cellPosition}" cell-model.bind="cell"></cell>
        </template>
export class CellPositionValueConverter
{
    toView(value)
    {
        return (Math.floor(value/9) + 1 + "") + ((value % 9) + 1 + "");
    }
}
1 Like