Skip to content

Instantly share code, notes, and snippets.

@tonylukasavage
Created April 26, 2014 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tonylukasavage/11318416 to your computer and use it in GitHub Desktop.
Save tonylukasavage/11318416 to your computer and use it in GitHub Desktop.
ALOY-362
exports.createController = function(name, args) {
var newController = new (require('alloy/controllers/' + name))(args);
_.each(_.keys(args), function(key) {
if (key.indexOf('#') === 0 && key !== '#') {
newController[key.substring(1)].applyProperties(args[key]);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment