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

How to use Javascript loops in the template? #9

Closed
volkanunsal opened this Issue Oct 23, 2012 · 1 comment

Comments

Projects
None yet
2 participants
@volkanunsal

volkanunsal commented Oct 23, 2012

Does this support random Javascript injection?

@dnagir

This comment has been minimized.

Show comment
Hide comment
@dnagir

dnagir Oct 23, 2012

Owner

You can do loops using:

%ul.todolist
  :each item in todolist
    %li= item.description

if-s:

:if todolist.length > 20
  %p Oh my, you are a busy fellow!

See comprehensive examples at https://github.com/creationix/haml-js

Owner

dnagir commented Oct 23, 2012

You can do loops using:

%ul.todolist
  :each item in todolist
    %li= item.description

if-s:

:if todolist.length > 20
  %p Oh my, you are a busy fellow!

See comprehensive examples at https://github.com/creationix/haml-js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment