Book Image

Knockout.JS Essentials

Book Image

Knockout.JS Essentials

Overview of this book

Table of Contents (16 chapters)
KnockoutJS Essentials
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Setting up the project


To start the new project, we are going to follow some steps that will give us a good starting point to develop our project:

  1. Create a new project as we did with the Knockout cart.

  2. Inside this project, copy the content of the Durandal Starter Kit project.

  3. Now we should have three folders in our project:

    • app: This contains our application

    • css: This contains stylesheets

    • lib: This contains third-party libraries

  4. Migrate the following libraries from the Knockout cart project to the Durandal cart project:

    • icheck

    • kovalidation

    • mockjax

    • mockjson

  5. Install a new library called Toastr from http://codeseven.github.io/toastr/.

  6. Update the ko.validation.js file on line 19 with the following code:

    define(["knockout", "exports"], factory);
  7. Move the style.css file from the Knockout cart to the css folder in the Durandal cart project.

  8. Move the models folder inside the app folder.

  9. Move the services folder inside the app folder.

  10. Create a file called bindings.js at the same level as the main.js file...