1

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?

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
Jonas Sourlier
  • 13,684
  • 16
  • 77
  • 148
  • It depends on how/when/where you use those lines. Posting more code (or better yet preparing a fiddle) might help. The lines by themselves are perfectly fine and should work (if used properly). – gkalpak Jan 22 '14 at 10:21
  • Is it inside a test suite? – Ilan Frumer Jan 22 '14 at 10:30

1 Answers1

0

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

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265