Loop in Jade nodejs

I am trying to create pagination in jade using nodejs

But there is problem in creating links, my code is:

    ul#pagination
-       for (var i = 0; i < #{count}; i++){
            li
                a(href='/home/i')= i
-       }

I also tried a(href='/home/#{i}') #{i} and a(href='/home/'+i)= i but not works

#{count} gives me the total number of pages,but the loop is not working properly. Why?

I changed the indentation and it works for me:

ul#pagination
    - for (var i=1; i<=count; i++)
        li
            a(href='/home/'+i)= i   

If not work then create a new jade file and then include it by include newfile , and test, if it works then copy all contents of new file in your original file.

It might be possible with some syntax in the Jade template, but you could also consider creating the link array in your node script, exposing it to the template and using a regular each loop.