[Solved] Use navController or other class in GoogleMaps object?


How i can use methods of other classes in a google maps object?


var markers = this.locations.map(function(location, info) {
var marker = new google.maps.Marker({
position: location,
label: labels[info % labels.length]

        google.maps.event.addListener(marker, 'click', function() {
          //here i want use something like this
        return marker;

There is the way to use the method of a Class in the object of another Class?


You pretty much never want to type function in Ionic, instead you want to utilize fat arrows () =>.

So replace function() with () => and function(location, info) with (location, info) =>.


i love you, seriously i love you …thanks man, I wasted 5 hours today to try to solve this problem