I have been struggling trying to solve Possibly unhandled rejection: ZERO_RESULTS
-messages that I get when closing a ui bootstrap modal with a ng-map inside of it. There is two of the same entry.
Here is an image of the errormessages:
Error message from console
From what I have gathered it is exactly what it says.. An unhandled rejection. I have went through all promises I use in my controller and all of them have a .catch()
-block. This has led me to belive that the error is from a thirdparty plugin.
This is the markup for ng-map:
<div map-lazy-load="https://maps.google.com/maps/api/js"
map-lazy-load-params="{{map.apiKey}}" lazy-init="true">
<ng-map zoom="14" center="{{map.coordinates.x}},{{map.coordinates.y}}">
<marker position="{{map.coordinates.x}},{{map.coordinates.y}}">
</marker>
</ng-map>
</div>
I removed the <marker>
and one of the error messages goes away. If I remove the <ng-map>
aswell the other message is gone, however that means that the map and the marker are gone.
NOTE: Hiding the error message is NOT an option.
Try to specify fake coodrinates for map.coordinates.x
and map.coordinates.y
on marker
and ng-map
directives. Properties position
and center
need a valid numbers and if they are not provided angular throws an error. This is the best i came with.