-
Book Overview & Buying
-
Table Of Contents
Knockout.JS Essentials
By :
To start the new project, we are going to follow some steps that will give us a good starting point to develop our project:
Create a new project as we did with the Knockout cart.
Inside this project, copy the content of the Durandal Starter Kit project.
Now we should have three folders in our project:
app: This contains our application
css: This contains stylesheets
lib: This contains third-party libraries
Migrate the following libraries from the Knockout cart project to the Durandal cart project:
icheck
kovalidation
mockjax
mockjson
Install a new library called Toastr from http://codeseven.github.io/toastr/.
Update the ko.validation.js file on line 19 with the following code:
define(["knockout", "exports"], factory);Move the style.css file from the Knockout cart to the css folder in the Durandal cart project.
Move the models folder inside the app folder.
Move the services folder inside the app folder.
Create a file called bindings.js at the same level as the main.js file...
Change the font size
Change margin width
Change background colour