Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change angular jQLite with actual jQuery

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, ngModel) {

element must be jQuery object. Now i'm converting it manually and i don't like it:

 element = $(element[0]);
like image 982
karaxuna Avatar asked Dec 31 '13 09:12

karaxuna


1 Answers

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>
like image 179
Mickael Avatar answered Nov 10 '22 15:11

Mickael