UNPKG

vj-app-arch-2

Version:

Create Nice HTML Short Methods

22 lines (20 loc) 533 B
exports.gen_list_view = function(list_view_str) { var lists=[]; if (list_view_str.length>0) { lists = list_view_str.split(","); } console.log(lists); console.log("Generating List View"); list_view = "<ul>"; console.log("No of records found:" + lists.length); if(lists.length>0){ for(var i=0; i<lists.length; i++){ list_view += "<li>"; list_view += lists[i]; list_view += "</li>"; } } list_view += "</ul>"; console.log("Generated List View"); return list_view; }