Working example: http://plnkr.co/edit/mamx5EXtHxSo4aqMSZUd
- Original > ic-map.js:156 My event listener should have been bound with
google.maps.event.addListener()
(see Working Example > ic-map.js:154-156). - Also, it was too much trouble to use templates, so I added 2 divs as children of
div#map
(see Working Example > index.html:41-42). Due to how inheritence and shared models work, all of the directives MUST be on the same DOM element (because no-one can look down, only up). This was necessary for moving the directive logic out of the controller (as was the implementation from AngularUI). In my implementation, the model is shared across the icMaps* directives within the directives (and directive controllers). - Difference of
marker
:- uiMapMarker,
marker
is attached to a DOM object:ng-repeat="marker in markers"
- icMapMarkers,
marker
is just a js object.
- uiMapMarker,