Uncaught TypeError: angular.lowercase is not a function

后端 未结 8 1683
感动是毒
感动是毒 2021-02-02 08:58

Uncaught TypeError: angular.lowercase is not a function

this error in my angularjs application, and entire application is not running. This

8条回答
  •  情书的邮戳
    2021-02-02 09:57

    As you can see here, angular deprecated their lowercase util method.

    The library you use has not updated yet and is therefore only compatible with an angular version before 1.6.7. But since you get this error, the angular version you use is probably higher.

    You can either

    (A) Downgrade angular to 1.6.7, in your bower.json:

    "dependencies": {
       "angular": "1.6.7",
       ...
    }
    "resolutions": {
       "angular": "1.6.7"
    }
    

    (B) Create a simple workaround by adding these methods back as such:

    angular.lowercase = text => text.toLowerCase();
    

    Make sure this is done after angular is loaded but before your app starts.

提交回复
热议问题