Created
August 15, 2012 18:29
-
-
Save tonylukasavage/3362168 to your computer and use it in GitHub Desktop.
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
var Alloy = require('alloy'), | |
Backbone = Alloy.Backbone, | |
_ = Alloy._, | |
A$ = Alloy.A; | |
function Controller() { | |
require('alloy/controllers/<%= parentController %>').call(this); | |
var exports = <%= exportsObj %>; | |
// exportsObj looks something like this: | |
// { | |
// foo: function(args) {}, | |
// bar: function() { | |
// $.someLabelById.text = 'hi there'; // access to $ variable | |
// }, | |
// customProp: 123, | |
// anotherFunc: function(args) { | |
// exports.bar(); // have to test if this will work | |
// } | |
// } | |
var $ = this; | |
<%= viewCode %> | |
<%= controllerCode %> | |
_.extend($, exports); | |
} | |
module.exports = Controller; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment