I am using ngMap to display a map with markers on it. I want to redirect the user to a URL, when he clicks a marker. To build this URL, i need a unique id, from the repeat.
I have this;
<marker ng-repeat="position in ctrl.positions" position="{{position.x}}, {{position.y}}" on-click="ctrl.goto(ctrl.id)"></marker>
In my controller i have
vm.clickRedirect = function(pId) {
console.log(pId);
}
I just return the object, and the actual id (ctrl.id). How do i achive this?