Skip to content

Commit 74be3d3

Browse files
samjulienIgorMinar
authored andcommitted
fix(core): mute mode printing in console in prod mode
Closes angular#6873
1 parent a15ca23 commit 74be3d3

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

modules/angular2/src/core/application_ref.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,10 @@ export class ApplicationRef_ extends ApplicationRef {
456456
});
457457
return completer.promise.then(_ => {
458458
let c = this._injector.get(Console);
459-
let modeDescription =
460-
assertionsEnabled() ?
461-
"in the development mode. Call enableProdMode() to enable the production mode." :
462-
"in the production mode. Call enableDevMode() to enable the development mode.";
463-
c.log(`Angular 2 is running ${modeDescription}`);
459+
if (assertionsEnabled()) {
460+
c.log(
461+
"Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.");
462+
}
464463
return _;
465464
});
466465
}

0 commit comments

Comments
 (0)