[Framework] Refactor source folder

Refactor framework source folder; move each initialization
stage into its own directory. WTD-518.
This commit is contained in:
Victor Woeltjen
2014-11-05 12:18:19 -08:00
parent dbd5b148e2
commit 73e767228f
11 changed files with 11 additions and 11 deletions

View File

@ -0,0 +1,43 @@
/*global define,Promise*/
/**
* Module defining Bootstrapper. Created by vwoeltje on 11/4/14.
*
* The bootstrapper is responsible
*/
define(
[],
function () {
"use strict";
/**
* The application bootstrapper is responsible for issuing the
* bootstrap call to Angular. This would normally not be needed
* with an appropriately-placed ng-app directive, but the
* framework needs to wait until all extensions have been loaded
* and registered.
*
* @constructor
*/
function ApplicationBootstrapper(angular, document, $log) {
return {
/**
* Bootstrap the application.
*
* @method
* @memberof ApplicationBootstrapper#
* @param {angular.Module} app the Angular application to
* bootstrap
*/
bootstrap: function (app) {
$log.info("Bootstrapping application " + (app || {}).name);
angular.element(document).ready(function () {
angular.bootstrap(document, [app.name]);
});
}
};
}
return ApplicationBootstrapper;
}
);