javascript - ul in li , tree display with jade -


i have object of object of object ... have tree !

i use jade code display tree :

mixin file_list(files) ul     each file, in files         li #{file.id}         if file.children.length > 0             mixin file_list(file.children) 

but result is:

<ul>     <li></li>     <ul>         <li></li>     </ul> </ul> 

i need :

<ul>     <li>         <ul>             <li></li>         </ul>     </li> </ul> 

mixin file_list(files) ul     each file, in files         li #{file.id}             if file.children.length > 0                 mixin file_list(file.children) 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -