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:
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 applicationcss
: This contains stylesheetslib
: 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 thecss
folder in the Durandal cart project.Move the
models
folder inside theapp
folder.Move the
services
folder inside theapp
folder.Create a file called
bindings.js
at the same level as themain.js
file...