thanks it is not working here (has no method Controller) => error
- I am reading the controller from the script above
- steal('jquerypp/controller',function(){
- can.Controller("first_div",
- /* @static */
- {
- defaults : {
- defaultText : "Hi, i am firstDiv!"
- }
- },
- /* @prototype */
- {
- pressCounter : 0,
- /**
- * Initialize a new instance of the firstDiv controller.
- */
- init : function() {
- this.refresh();
- },
- /**
- * Responds to a click on th button created by the template
- * @param el Not used
- */
- '#my_first_button click': function( el ){
- this.pressCounter++;
- this.refresh();
- },
- refresh : function() {
- this.element.html('../view/first_div_init.ejs', {header:this.options.defaultText}, {counter:this.pressCounter});
- }
- }
- )
- });