[javascriptMVC] Class Init

- - posted in javascriptmvc | Comments

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$.Controller('Alive',{
  //static init
  init: function(){
      steal.dev.log('The class init will be invoked whenever you declare a class');
  }
},{
  init: function(){
      steal.dev.log('The instance init will be invoked whenever you declare a new instance');
  }
});

/*Console: The class init will be invoked whenever you declare a class */
new alive(element);
/*Console: The instance init will be invoked whenever you declare a new instance */

Comments