Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marko v3: Looping over object properties #175

Closed
patrick-steele-idem opened this Issue Dec 8, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@patrick-steele-idem
Copy link
Contributor

patrick-steele-idem commented Dec 8, 2015

New Syntax

<for(name,value in {'foo': 'low', 'bar': 'high'})>
    ${name}: ${value}
</for>

<ul>
    <li for(name, value in {'foo': 'low', 'bar': 'high'})>
        ${name}: ${value}
    </li>
</ul>

Old Syntax

<for each="(name,value) in {'foo': 'low', 'bar': 'high'}">
    $name: $value
</for>

<ul>
    <li for="(name, value) in {'foo': 'low', 'bar': 'high'}">
        $name: $value
    </li>
</ul>

@patrick-steele-idem patrick-steele-idem added this to the 3.0 milestone Dec 29, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.