WARNING: Tried to load angular more than once. when I include JQuery

后端 未结 8 1677
暖寄归人
暖寄归人 2020-12-01 21:58

I am building an yeoman app with an angular-generator.

The js libraries included in my index.html file are:



        
8条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-01 22:29

    I was getting the same warning and it was because of the order of the files included, as well as the version used.

    To resolve the above warning , I re-included the files in the following order:

    jquery.js
    jqueryui.js
    angular.js
    

    Note: You have to add jquery script tag before angularjs so that angularjs can replace jqLite by jQuery.

    Moreover, my code was working with AngularJS v1.2.0, but not with a higher angular version. So check for your jquery and angularjs version compatibility as well.

提交回复
热议问题