Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : How to make working JqueryMX ?

$
0
0
thanks it is not working here (has no method Controller) => error

- I am reading the controller from the script above
  1. steal('jquerypp/controller',function(){
  2. can.Controller("first_div",
  3.     /* @static */
  4.     {
  5.         defaults : {
  6.             defaultText : "Hi, i am firstDiv!"
  7.         }
  8.     },
  9.     /* @prototype */
  10.     {
  11. pressCounter : 0,
  12.         /**
  13.          * Initialize a new instance of the firstDiv controller.
  14.          */
  15.         init : function() {
  16.             this.refresh();
  17.         },
  18.         /**
  19.          * Responds to a click on th button created by the template
  20.          * @param el    Not used
  21.          */
  22.         '#my_first_button click': function( el ){
  23.             this.pressCounter++;
  24. this.refresh();
  25.         },
  26. refresh : function() {
  27. this.element.html('../view/first_div_init.ejs',  {header:this.options.defaultText}, {counter:this.pressCounter});
  28. }

  29.     }
  30. )
  31. });

Viewing all articles
Browse latest Browse all 3491

Trending Articles