Open ghost opened 6 years ago
Steps to reproduce and a minimal demo(Plunker Example)
Attempt to use lazy-init outside of the ng-click used in the example documentation. This also occurs when you try to run NgMap.initMap() in an $http callback.
NgMap.initMap()
https://plnkr.co/edit/oqQ4HiGqt4rpsEOLMrNS?p=preview
Current behavior
'TypeError: Cannot read property 'map' of undefined'
Expected/desired behavior
Wrapping NgMap.initMap() with NgMap.getMap().then(... gets rid of the error.
NgMap.getMap().then(...
Plunker that fixes the issue - https://plnkr.co/edit/lkaVgTxsjqgD2oQCgrWh?p=preview
Steps to reproduce and a minimal demo(Plunker Example)
Attempt to use lazy-init outside of the ng-click used in the example documentation. This also occurs when you try to run
NgMap.initMap()
in an $http callback.https://plnkr.co/edit/oqQ4HiGqt4rpsEOLMrNS?p=preview
Current behavior
'TypeError: Cannot read property 'map' of undefined'
Expected/desired behavior
Wrapping
NgMap.initMap()
withNgMap.getMap().then(...
gets rid of the error.Plunker that fixes the issue - https://plnkr.co/edit/lkaVgTxsjqgD2oQCgrWh?p=preview