change angular jQLite with actual jQuery

后端 未结 2 1694
甜味超标
甜味超标 2021-01-17 14:11

I want angularjs to use jQuery instead of jQLite by default. Is it possible? So that in directive link function:

 link: function (scope, element, attrs, ngMo         


        
相关标签:
2条回答
  • 2021-01-17 14:35

    Mickael got the right answer.

    Further, at the very end of the angular.js, there is...

      bindJQuery();
    

    which will do the trick. It's not a magic.

    0 讨论(0)
  • 2021-01-17 14:42

    You have to add jquery script tag before angularjs, this way angularjs will automatically replace jqLite by jQuery.

    <!-- Add jQuery -->
    <script type="text/javascript" src="jquery.js"></script>
    
    <!-- Then, add angular -->
    <script type="text/javascript" src="angularjs.js"></script>
    
    0 讨论(0)
提交回复
热议问题