I have a.html that defines javascript function inside script tag. Since apparently xxx() is not inside bCtrl, does anyone know how to call xxx()? The point is I can't move function xxx to controller or directive because someone who does not know angular is in charge of this function.
a.html
<html ng-app="myApp">
<div ng-controller="bCtrl">
.....
</div>
<script>
(function($) {
$(function(){
function xxx () {
// do something
}
});
})(jQuery);
</script>
</html>
bCtrl
angular
.module('myApp')
.controller('bCtrl', [
'$scope',
function ($scope) {
// wanna call xxx() if possible
}
]);