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

Re : Overriding controller destroy to wrap 'nulled' element - bad idea?

$
0
0
Yeah, I thought of deferreds too.  It's just too much manual glue to bother with.  If I find a good pattern I'll abstract it and share it here but for now I'm just using

  1. $.Controller(
  2.   "My.Controller",
  3.   {},
  4.   { destroy: function(){ this._super(); this.element = $(this.element); } }
  5. );

Then using My.Controller everywhere I would use have used $.Controller.

Viewing all articles
Browse latest Browse all 3491

Trending Articles