I'm getting the error ReferenceError: $ is not defined on my ionic application.
I'm trying to open links in the systems browser from my json file.
Here's the code:
$timeout(function () {
$('.ex-link').click(function () {
var url = $(this).attr('href');
window.open(encodeURI(url), '_system', 'location=yes');
return false;
})
})
Line which gets the error is:
$('.ex-link').click(function () {
Angular will use jqLite. However you can include jQuery.js before Angular.js and make Angular replace jqLite by jQuery. $ will be difined.
Include jQuery before including AngularJS as,