Skip to content

Instantly share code, notes, and snippets.

@aetheon
Last active August 29, 2015 14:06
Show Gist options
  • Save aetheon/7cd64e530cfaf1bb579b to your computer and use it in GitHub Desktop.
Save aetheon/7cd64e530cfaf1bb579b to your computer and use it in GitHub Desktop.
Alloy generated controller code
function Controller() {
require("alloy/controllers/BaseController").apply(this, Array.prototype.slice.call(arguments));
this.__controllerPath = "index";
arguments[0] ? arguments[0]["__parentSymbol"] : null;
arguments[0] ? arguments[0]["$model"] : null;
arguments[0] ? arguments[0]["__itemTemplate"] : null;
var $ = this;
var exports = {};
$.__views.index = Ti.UI.createWindow({
backgroundColor: "white",
id: "index"
});
$.__views.index && $.addTopLevelView($.__views.index);
$.__views.label = Ti.UI.createLabel({
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#000",
text: "Hello, World",
id: "label"
});
$.__views.index.add($.__views.label);
exports.destroy = function() {};
_.extend($, $.__views);
////// HERE goes your controller code
_.extend($, exports);
}
var Alloy = require("alloy"), Backbone = Alloy.Backbone, _ = Alloy._;
module.exports = Controller;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment