I want to know that how can I call a jQuery function in my angular function, like I've a jquery function like:
function testData(){
// code
}
and I've a angular function like:
myApp.controller(AppCtrl,['$scope', function($scope) {
$scope.imagesData = function(){
//here I need to call the function: testData()
}
}]);
so, Please let me know that how can I call my testData() inside the angularjs function($scope.imagesData()). Thanks in advance.
I tried this.I hope it might help. Js:
function testData(){
return ("entering");
}
var myapp = angular.module("myapp",[]);
myapp.controller("ctrl",['$scope', function($scope) {
$scope.imagesData = testData;
console.log($scope.imagesData());
}]);
Working Jsbin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With