javascript - Ionic: ReferenceError: $ is not defined -


i'm getting error referenceerror: $ not defined on ionic application.

i'm trying open links in systems browser json file.

here's code:

  $timeout(function () {    $('.ex-link').click(function () {      var url = $(this).attr('href');      window.open(encodeuri(url), '_system', 'location=yes');      return false;    }) }) 

line gets error is:

$('.ex-link').click(function () { 

angular use jqlite. can include jquery.js before angular.js , make angular replace jqlite jquery. $ difined.

include jquery before including angularjs as,

<!-- add jquery --> <script type="text/javascript" src="jquery.js"></script>  <!-- , angularjs --> <script type="text/javascript" src="angularjs.js"></script> 

Comments