AngularJS ngSanitize Error

2019-07-21 22:44发布

Hi guys it's my first question here and I've had searched in many forums but don't found the solution to my problem! Hope you guys can help me!

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 files versions but the problem persists. I don't know what to do anymore!

Thanks a lot! Look forward for the help!

2条回答
孤傲高冷的网名
2楼-- · 2019-07-21 22:57

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!

查看更多
唯我独甜
3楼-- · 2019-07-21 23:03

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.

查看更多
登录 后发表回答