slimjs / slim.js

Fast & Robust Front-End Micro-framework based on modern standards

Home Page:http://slimjs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repeat directives nested

vogloblinsky opened this issue · comments

Hi,

Considering this array :

let list = [[1], [1,1], [1,2,1]]

How can i iterate to the elements ?

<div s:repeat="list as line">
    <triangle-item s:repeat="line as item" text="{{item}}"></triangle-item>
</div>

I correctly got the first list rendered, but inside each first line, i got <!--triangle-item s:repeat="line as item"-->

Thanks

Found a workaround: https://jsfiddle.net/cx1h9jpL
Replace the div with your own custom element and nest the repeat inside.

Converting this to a feature request.

Thanks
This is for this benchmark : https://github.com/vogloblinsky/web-components-benchmark
The pascal triangle implementation.
I will update it tonight