Book Image

KnockoutJS Essentials

By : Jorge Ferrando, Jorge F Ferrando
Book Image

KnockoutJS Essentials

By: Jorge Ferrando, Jorge F Ferrando

Overview of this book

Table of Contents (16 chapters)
KnockoutJS Essentials
About the Author
About the Reviewers

Defining the app.js file

When we defined the RequireJS configuration, we said that the entry point will be the app.js file. The following are the steps to create the app.js file:

  1. Create the app.js file.

  2. Set the array of dependencies. Map these dependencies as arguments in the function. There are some files that just execute code and they return an undefined value. You don't need to map these files if they are at the end of the list of dependencies.

    ], function(bs, ko, koValidation, koAmdHelpers, 'iCheck', 'ViewModel) {
  3. Now define the body of the module. It will initialize global configurations and global behaviors. Finally, it will return the view-model:

      //ko External Template Settings...