hey,
Is it possible to add buttons with ng-click in template of a popup? To be clear this have to be in de template of somewhere else in the content of the popup NOT in the buttons[{}]
$ionicPopup.show({
title: 'Wat wilt u doen?',
subTitle: 'product = '+ ProductName ,
template: "<div class=\"wrapperpopup\"><div ng-click=\"AddOneProduct(" + ProductBarcode + " )\" class=\"addemovebuttonslijst add\"><span class=\"ion-ios-plus-empty icon-lijst-stylingadd\"></span><span class=\"icon-lijst-add-styling1\">1</span></div><div class=\"addemovebuttonslijst remove\"><span class=\"ion-ios-minus-empty icon-lijst-stylingadd\"></span></span><span class=\"icon-lijst-add-styling1\">1</span></div><div class=\"photopopup\" style=\"background:url('"+FotoUrl+"');background-size: 100%;background-repeat: no-repeat;z-index: -2;\"></div><div class=\"contentpopup\"><div class=\"contenttext\"><p class=\"textblack\">naam : " + ProductName + "</p><p class=\"textblack\">barcode : " + ProductBarcode + "</p><p class=\"textblack\">verpakking : " + ProductPakking + "</p><p class=\"textblack\">in bezit : " + ProductPresent + "</p><p class=\"textblack\">minimum aanweizig : " + ProductMinimuim + "</p></div></div></div>",
scope: $scope,
cssClass: "popup-vertical-buttons",
buttons: [
{ //delete
text: '<b>Verwijderen</b>',
type:'button-assertive',
onTap:function(e){
$ionicPopup.show({
title: 'VERWIJDEREN',
subTitle: 'Wiet u zeker dat u '+ name +' wilt verwijderen',
scope: $scope,
cssClass: "popup-vertical-buttons",
buttons: [{ //delete it
text: '<b>JA</b>',
type:'button-assertive',
onTap:function(e){
var stmt = "DELETE FROM card WHERE ID =" + id
$cordovaSQLite.execute(db, stmt).then(function(res) {
console.log("is weg");
}, function (err) {
console.error(err);
});
}
},
{ //delete not
text: '<b>NEE</b>',
type:'button-calm',
}]
})
}
},
{ //close
text: '<b>Sluiten</b>',
type: 'button-calm',
},
]
})
thank you !!!