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 || app.data.books || [];
 3
 4  for(var i=0, len=bookList.length; i<len; i++) {
 5
 6    var book = bookList[i];
 7
 8    // Existing code
 9  }
10}

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