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?
Use the version property:
to compare the version in question to the version in which this API was synced between the
mock
andng
modules:References
AngularJS Changelog
The $logProvider mock doesn't implement $log.debug() and debugEnabled() in version 1.1.x #2343