angularjs/ngmap context menu

111 views
Skip to first unread message

Charles Jackson

unread,
Oct 28, 2015, 1:25:50 PM10/28/15
to AngularJS
I'm using ngmap and need to create a context menu when peeps right-click anywhere on the map and display a list of options. I've create an event using...

            google.maps.event.addListener($scope.map, "rightclick",function(event){
                $scope.showContextMenu(event);
            });

...which all works hunky-dory but I'm a bit stumped on how best to go about inserting a context menu where each option in the context menu is bound to a function in $scope. Can anybody provide a novice with advice on the best approach? Not sure if creating a new DOM element is the angular way... should I be looking at a directive?

Any simple advice on the best approach is appreciated.

Cheers.
Reply all
Reply to author
Forward
0 new messages