Uncaught TypeError: angular.lowercase is not a function

后端 未结 8 1513
感动是毒
感动是毒 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:53

    Ovidiu Dolha's answer got me almost there. If you look at the pre-deprecation implementation of the lowercase function, it is a bit more. This shim implementation did the trick for me:

    /**
     * @brief Shim for textAngular in order to make it compatible with the latest 
     *   version of angularjs
     */
    
    function lowercase(string) {
      return (typeof string === 'string') ? string.toLowerCase() : string;
    }
    
    // Angular deprecated the lowercase function as of v1.6.7. TextAngular hasn't 
    // updated to reflect this
    angular.lowercase = lowercase;
    

提交回复
热议问题