我在显示带有按钮的模态时出现问题,我已将其放在标记消息中,这是我的代码,所有功能都很好,但不是这个按钮, 我的controller.js
**$ionicModal.fromTemplateUrl('templates/addLocation.html', {
scope: $scope,
animation: 'slide-in-up'
}).then(function(modal) {
$scope.modal = modal;
});**
// Get the ouvrage geojson data from a JSON
$http.get("js/ouvrage/ouvrage.json").success(function(data, status) {
angular.extend($scope, {
geojson: {
data: data,
style: {
weight: 2,
opacity: 1,
color: 'green',
dashArray: '3',
fillOpacity: 0
},
onEachFeature: function (feature, layer) {
popupOptions = {maxWidth: 350};
layer.bindPopup(
'<h5><b>Informations sur l"ouvrage : </b></h5>'+
"<b>Groupe:</b> " + feature.properties.groupe +
"<br><b>Famille : </b>" + feature.properties.id_famille +
"<br><b>Ouvrage : </b>" + feature.properties.nom_ouvrag +
"<br><b>Projet : </b>" + feature.properties.projet +
"<br><b>Nombre d'élements: </b>" + feature.properties.nbre_element +
"<br>"+
'**<button class="button button-primary" ng-click="modal.show();">Confirm</button>**'
,popupOptions);
}
}
});
});