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
- $.Controller(
- "My.Controller",
- {},
- { destroy: function(){ this._super(); this.element = $(this.element); } }
- );
Then using My.Controller everywhere I would use have used $.Controller.