Using Knockout in our app

Let's make another copy of our jQuery app and name the folder Knockout. We will not need jQuery for this application, since we can use Knockout and the ArcGIS JavaScript API to handle those functions. We'll start by replacing all the references to jQuery with Knockout references. The dojoConfig script at the head of the document should look like the following:

dojoConfig = {
  async: true,
  packages: [
      name: 'y2k',
      location: location.pathname.replace(/\/[^\/]*$/, '') + '/js'
   }, {
      name: "d3",
      location: ""
    }, {
     name: "knockout",
     location: "",
     main: "knockout-min"

Next, we'll add a reference to Knockout in our Census.js ...

Get Mastering ArcGIS Server Development with JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.