4
I’m using Ionic 1.3 and creating a Maps screen, this screen will feature a menu to select the specific destinations and another that is the maps with the location.
Example of destination selection screen:
Controller:
var mapasJson = {
"Foo": {
"0": {
"titulo": "local 1",
"coordenadas": "001,002"
},
"1": {
"titulo": "local 2",
"coordenadas": "001,002"
}
}
};
app.controller('mapasItemsCtrl', ['$scope', '$stateParams', function ($scope, $stateParams, $http) {
$scope.destinos = mapasJson;
}]);
Template:
<div class="item item-divider">
Foo
</div>
<div class="item item-button-right item-text-wrap" ng-repeat="d in destinos.Foo">
{{d.titulo}}
<a class="button button-positive" href="">
<i class="icon ion-ios-navigate-outline"></i>
</a>
</div>
Upshot:
Hence my question is, how do I pass the coordinates to the tag <a>
when click on it call the map screen and then yes go to the location?
Here’s a demo of the maps: https://codepen.io/ionic/pen/uzngt