[Code Style] Use prototypes in framework layer

WTD-1482
This commit is contained in:
Victor Woeltjen
2015-08-14 14:42:25 -07:00
parent 7fe866060b
commit edca2a9f03
14 changed files with 750 additions and 676 deletions

View File

@ -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;
}
);