Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
KnockoutJS Web Development

You're reading from  KnockoutJS Web Development

Product type Book
Published in Feb 2015
Publisher
ISBN-13 9781782161028
Pages 178 pages
Edition 1st Edition
Languages

Mapping – first look


We have been creating manual maps of our ViewModel so far in this book. With smaller datasets this can be practical and productive. As our datasets get larger along with the need to update the data, this will become a chore that has an alternative, enjoyed by a great number of Knockout developers. This is done through a mapping plugin. Knockout is a jQuery-based library in more than one way. It is possible to build and use libraries, called plugins, for Knockout also. The most famous library is the mapping library. I have included a copy of it in the downloaded files for this book. We will be looking again at the preceding code for our example but moving it this time using the mapping plugin.

We will create a file called mapping.html for our code this time. We will need to include one more JavaScript file right after the Knockout call for our mapping plugin. You can find these files in the working examples folder in the ZIP download. This, in our case, should look like...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}