Sha256: 5af7269b3c6b73445c09414a021638f7fb0b9fa25eb9851e3aaf4ab78ce8cfd1

Contents?: true

Size: 1.47 KB

Versions: 12

Compression:

Stored size: 1.47 KB

Contents

// ==========================================================================
// <%= class_name %>
// ==========================================================================

// This is the function that will start your app running.  The default
// implementation will load any fixtures you have created then instantiate
// your controllers and awake the elements on your page.
//
// As you develop your application you will probably want to override this.
// See comments for some pointers on what to do next.
//
function main() {

  // Step 1: Load Your Model Data
  // The default code here will load the fixtures you have defined.
  // Comment out the preload line and add something to refresh from the server
  // when you are ready to pull data from your server.
  <%= class_name %>.server.preload(<%= class_name %>.FIXTURES) ;

  // TODO: refresh() any collections you have created to get their records.
  // ex: <%= class_name %>.contacts.refresh() ;

  // Step 2: Instantiate Your Views
  // The default code just activates all the views you have on the page. If
  // your app gets any level of complexity, you should just get the views you
  // need to show the app in the first place, to speed things up.
  SC.page.awake() ;

  // Step 3. Set the content property on your primary controller.
  // This will make your app come alive!

  // TODO: Set the content property on your primary controller
  // ex: <%= class_name %>.contactsController.set('content',<%= class_name %>.contacts);

} ;

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sproutcore-0.9.12 sc_generators/client/templates/main.js
sproutcore-0.9.15 sc_generators/client/templates/main.js
sproutcore-0.9.14 sc_generators/client/templates/main.js
sproutcore-0.9.13 sc_generators/client/templates/main.js
sproutcore-0.9.19 sc_generators/client/templates/main.js
sproutcore-0.9.16 sc_generators/client/templates/main.js
sproutcore-0.9.17 sc_generators/client/templates/main.js
sproutcore-0.9.18 sc_generators/client/templates/main.js
sproutcore-0.9.22 sc_generators/client/templates/main.js
sproutcore-0.9.20 sc_generators/client/templates/main.js
sproutcore-0.9.23 sc_generators/client/templates/main.js
sproutcore-0.9.21 sc_generators/client/templates/main.js