antonmedv / monkberry

Monkberry is a JavaScript library for building web user interfaces
https://monkberry.js.org
MIT License
1.49k stars 78 forks source link

[QUESTION] for...else implementation on templating #35

Open cezarsmpio opened 7 years ago

cezarsmpio commented 7 years ago

Hi guys, first of all, this library is just amazing!

What dou you think guys about implement something like this in templating:

{% for array %}
    ....
{% else %}
   // array is empty
{% endfor %}

Python has a good example of this implementation.

>>> for x in [1]:
...     print("Then")
... else:
...     print("Else")

Thanks!

antonmedv commented 7 years ago

Hi, thanks. Nice feature.