mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
[Framework] Refactor source folder
Refactor framework source folder; move each initialization stage into its own directory. WTD-518.
This commit is contained in:
43
platform/framework/src/bootstrap/ApplicationBootstrapper.js
Normal file
43
platform/framework/src/bootstrap/ApplicationBootstrapper.js
Normal 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;
|
||||
}
|
||||
);
|
Reference in New Issue
Block a user