I'm writing an Android app, in which I need to invoke some javascript to interact with my AngularJS application.
Normally, I would write some code like the following:
angular.element(document.getElementById("theNameOfTheElement")).scope().nameOfFunction();
However, if the scope of that element is written within an IIFE, then it seems as though the angular scope is no longer available to outside vanilla javascript...
This obviously poses a problem if my team is following the John Papa style guide for our AngularJS code.
How would I expose the scope to outside javascript, or expose a public API to native javascript?