Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Reduce the size of the angular generated DOM and increase runtime per…
Browse files Browse the repository at this point in the history
…formance by turning off angular debug info.

Angular spits out all kinds of debug info that is not wanted in a production app. This info can easliy be turned back on at runtime by typing at the js console: angular.reloadWithDebugInfo().
  • Loading branch information
mtho11 committed Oct 9, 2015
1 parent 82cb731 commit a9562d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions console/src/main/scripts/plugins/metrics/ts/metricsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ module HawkularMetrics {
'hawkular.services', 'ui.bootstrap', 'topbar', 'patternfly.select', 'angular-momentjs', 'angular-md5', 'toastr',
'infinite-scroll', 'mgo-angular-wizard', 'truncate', '500tech.smart-truncate']);

_module.config(['$compileProvider', function ($compileProvider) {
//disable debug info
//NOTE: tools like Batarang and Protractor may not work properly with this debug info off
//However, this can be turned back on at runtime in the js console by typing: angular.reloadWithDebugInfo()
$compileProvider.debugInfoEnabled(false);
}]);

_module.config(['$httpProvider', '$locationProvider', '$routeProvider',
($httpProvider, $locationProvider) => {
$locationProvider.html5Mode(true);
Expand Down

0 comments on commit a9562d3

Please sign in to comment.