Object $LogProvider has no method debugEnabled

275 Views Asked by At

When using the following lines of code on my Angular module myApp:

myApp.config(function ($logProvider) {
    $logProvider.debugEnabled(true);
});

I'm getting this error:

Uncaught TypeError: Object #<$LogProvider> has no method 'debugEnabled' from myApp core.ts:6
(anonymous function) core.ts:6
invoke angular.js:2990
(anonymous function) angular.js:2914
forEach angular.js:130
loadModules angular.js:2900
createInjector angular.js:2842
doBootstrap angular.js:1037
bootstrap angular.js:1052
angularInit angular.js:1010
(anonymous function) angular.js:15154
jQuery.Callbacks.fire jquery-1.9.1.js:1037
jQuery.Callbacks.self.fireWith jquery-1.9.1.js:1148
jQuery.extend.ready jquery-1.9.1.js:433

What am I doing wrong?

1

There are 1 best solutions below

0
On

Use the version property:

angular.version.full

to compare the version in question to the version in which this API was synced between the mock and ng modules:

1.2.0rc1 spooky-giraffe (2013-08-13) keep mock.$log the api in sync with $log

References