4

My problem: I have to use the ngSanitize module, but when I run the project, I have the following error:

Failed to instantiate module ngSanitize due to: lowercase is not a function.

I've had organized all my .js files, and organize all file versions, but the problem persists. I don't know what to do anymore.

peterh
  • 11,875
  • 18
  • 85
  • 108
João Rocha
  • 91
  • 1
  • 6

3 Answers3

5

I'd found the error, for a unknown reason my sbt was importing the angular in 1.7.0 version, in this angular version the angular.lowercase was removed. Glad you guys are helpful and friendly! Thanks a lot for the help!

João Rocha
  • 91
  • 1
  • 6
2

I faced the same issue, npm was installing random version of ng-sanitize, so I removed ^(caret) sign from package.json for all the dependencies then run npm install, It worked fine.

Nikhil
  • 21
  • 1
  • 5
1

Update to latest version of angular and angular-sanitize. Key is to install same versions of both libraries. If there is mismatch it might cause compatibility issues like lowercase or uppercase methods not found.

Shashi Kiran
  • 367
  • 3
  • 9