fabiobiondi/angular-fullscreen — pull request #1 by djvirgen (2013-11-23 05:36:11+00:00)
Title: Adds support for AMD loading

Allows the script to be loaded via AMD, e.g. require.js.

**Requirements for require.js:**

Add pathis for `FBAngular` and `angular` named modules to your config:

var require = {
/* ... */
paths: {
'angular': 'path/to/angular',
'FBAngular': 'path/to/angular-fullscreen'
}
};

Add `FBAngular` to your module's dependencies:

define(['angular', 'FBAngular'], function(angular, fbAngularModule) {
// Note: fbAngularModule is the angular module, but most likely isn't needed

// Add 'FBAngular' as a dependency to your Angular app:
var app = angular.module('myApp', ['FBAngular']);
});

Additional changes include:

- Use inline bracket notation to allow the file to be minified, see: http://docs.angularjs.org/tutorial/step_05#controller_a-note-on-minification
- Inject `$document` instead of using global `document` to improves testability