I have a well-written Angular app, but I need to access an instance of an object created by Angular. The Angular code snippet below contains the line [g.mapInstance = i =....]. My goal is to access the map instance using pure JavaScript outside of Angular. I hope this explains my question clearly. Thank you very much...
a.module("myapp.maps", []).value("mapsConfig", {}).factory("mapsApi", ["$window", "$q", "mapsConfig", function(a, b, c) {
return b(function(b) {
var d = c.apiKey || "",
e = c.libraries || [],
f = e.join(",");
a.__handleApiReady = function() {
b(google.maps)
};
$script("//maps.googleapis.com/maps/api/js?sensor=false" + (d ? "&key=" + d : "") + (f ? "&libraries=" + f : "") + "&callback=__handleApiReady")
})
}]).directive("maps", ["mapsApi", function(c) {
return {
restrict: "A",
replace: true,
transclude: true,
scope: {
center: "=center",
zoom: "=zoom",
dragging: "=dragging",
control: "=",
options: "=options",
events: "=events",
styles: "=styles",
bounds: "=bounds",
geocode: "="
},
template: '<div><div class="map-container"></div><div ng-transclude style="display: none"></div></div>',
controller: ["$scope", "$element", "$attrs", function(d, e, f) {
var g = this,
h = d.events,
i;
c.then(function(c) {
....(remaining code goes here)
});
}]
}...... more content