demo/apps/todomvc/basis/js/app.js
function(){
    // set up router
    router.route(/^\/(active|completed)$/).param(0).as(function(subset){
      Todo.selected.set(Todo[subset || 'all']);
    });

    // return app root node
    return new Node({
      template: resource('./app/template/layout.tmpl'),
      binding: {
        // nested views
        form: resource('./module/form/index.js'),
        list: resource('./module/list/index.js'),
        stat: resource('./module/stat/index.js')
      }
    });
  }
function(){
    // set up router
    router.route(/^\/(active|completed)$/).param(0).as(function(subset){
      Todo.selected.set(Todo[subset || 'all']);
    });

    // return app root node
    return new Node({
      template: resource('./app/template/layout.tmpl'),
      binding: {
        // nested views
        form: resource('./module/form/index.js'),
        list: resource('./module/list/index.js'),
        stat: resource('./module/stat/index.js')
      }
    });
  }
function ( ) { // set up router router . route ( / ^\/(active|completed)$ / ) . param ( 0 ) . as ( function ( subset ) { Todo . selected . set ( Todo [ subset || 'all' ] ) ; } ) ; // return app root node return new Node ( { template : resource ( './app/template/layout.tmpl' ) , binding : { // nested views form : resource ( './module/form/index.js' ) , list : resource ( './module/list/index.js' ) , stat : resource ( './module/stat/index.js' ) } } ) ; }
init method invoke on document ready
init method invoke on document ready