Render book list with argument

Now the render list will take an optional argument. When no list is specify, it render the entire book list. Otherwise, it render the given book list, which we create based on the selected tags.

 1view.renderList = function(bookList){
 2  bookList = bookList || || [];
 4  for(var i=0, len=bookList.length; i<len; i++) {
 6    var book = bookList[i];
 8    // Existing code
 9  }

What’s next? We’re going to take a look at “Reseting all data”.

overlaied image when clicked on thumbnail

Makzan | Mobile web app dev with phonegap | Table of Content