Created
January 3, 2012 07:39
-
-
Save jbueza/1553949 to your computer and use it in GitHub Desktop.
Cleaner way of writing Mojo Controllers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mojo.define("resaas.controller.LoginController", function() { | |
var $ = jQuery; | |
var LoginController = { | |
events: [], methods: {} | |
}; | |
return LoginController; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am thinking about changing it so that jQuery automatically gets passed into the function like this -- We've been running into a lot of repetitive things like re-declaring $ as jQuery since there's double MooTools action going on.