Skip to content

Instantly share code, notes, and snippets.

@foleyatwork
Last active September 8, 2015 16:56
Show Gist options
  • Select an option

  • Save foleyatwork/f2a67d4a28f43a55d1cd to your computer and use it in GitHub Desktop.

Select an option

Save foleyatwork/f2a67d4a28f43a55d1cd to your computer and use it in GitHub Desktop.
An example of a site.js file that works well with sqs-controller.
/**
* This variable gets added to "window" and becomes
* the global namespace for your site.
*
* @namespace Site
* @global
*/
var Site = {};
/**
* @namespace controllers
* @memberof Site
*/
Site.controllers = {};
/**
* @method createController
* @param {String} name
* @param {Function} factory
*/
Site.createController = function(name, factory) {
Site.controllers[name] = factory;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment