Re: [w3c/webcomponents] [templates] How featureful should the default processor be? (#682)

Have you considered using [Jinja](http://jinja.pocoo.org/)/[Twig](https://twig.symfony.com/) syntax for conditionals and loops?

```twig
{% if condition %}
    <span>{{ val }}</span>
{% endif %}
```

```twig
{% for user in users %}
    * {{ user.name }}
{% else %}
    No users have been found.
{% endfor %}
```

The `<template directive="foreach" expression="items">` syntax seems really verbose to me, and the [Handlebars](https://handlebarsjs.com/builtin_helpers.html) syntax is aesthetically unpleasing in my opinion.

It might also help to distinguish between expression output and control structures in this way.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/682#issuecomment-381363298

Received on Saturday, 14 April 2018 21:56:42 UTC