Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check if debug information is enabled in angular?

Tags:

One can toggle angulars debug infos by calling

$compileProvider.debugInfoEnabled(debugInfoState);

within the config method of an angular app.

Is there a way of checking if debug information is enabled via the console when an app is running in the browser?

like image 924
ManuKaracho Avatar asked Apr 01 '16 13:04

ManuKaracho


1 Answers

The debugInfoEnabled function is a setter/getter. It can be checked in a config block.

app.config(function ($compileProvider) {
    var debugEnabled = $compileProvider.debugInfoEnabled();
    console.log("debugInfoEnabled=", debugEnabled);
});

See the source code.

like image 62
georgeawg Avatar answered Oct 03 '22 14:10

georgeawg