I am trying to access an Angular function from an existing website with a content script or something similar. I know the function I need to call, but I'm unfamiliar with the scope of Angular functions. So, even though I can see the function, and I know what parameters to pass into it, I can't call it from the console.
Here it the function I need...
angular.module("smartwayTraffic").controller("mapController", ["$scope", "$window", "$q", "$timeout", "$modal", "_", "constant", "geolocation", "dataService", "mapService", function(n, t, i, r, u, f, e, o, s, h) {
...
n.gotoRegion = function(t) {
e.regionBounds.forEach(function(i) {
i.region === t && (y(), n.map.control.fitBounds(i.bounds), v())
})
};
....
What else do I need to trigger this function from the console?
....gotoRegion("Nashville");