mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
[Code Style] Use prototypes in framework layer
WTD-1482
This commit is contained in:
@ -42,25 +42,27 @@ define(
|
||||
* @constructor
|
||||
*/
|
||||
function ApplicationBootstrapper(angular, document, $log) {
|
||||
return {
|
||||
/**
|
||||
* Bootstrap the application.
|
||||
*
|
||||
* @method
|
||||
* @memberof ApplicationBootstrapper#
|
||||
* @param {angular.Module} app the Angular application to
|
||||
* bootstrap
|
||||
* @memberof platform/framework.ApplicationBootstrapper#
|
||||
*/
|
||||
bootstrap: function (app) {
|
||||
$log.info("Bootstrapping application " + (app || {}).name);
|
||||
angular.element(document).ready(function () {
|
||||
angular.bootstrap(document, [app.name]);
|
||||
});
|
||||
}
|
||||
};
|
||||
this.angular = angular;
|
||||
this.document = document;
|
||||
this.$log = $log;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap the application.
|
||||
*
|
||||
* @param {angular.Module} app the Angular application to
|
||||
* bootstrap
|
||||
*/
|
||||
ApplicationBootstrapper.prototype.bootstrap = function (app) {
|
||||
var angular = this.angular,
|
||||
document = this.document,
|
||||
$log = this.$log;
|
||||
$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