I use $ ionicPopup.prompt with the OK button, which I try to disable programmatically if none of the input options are selected.
Even if I put: attr: 'ng-disabled = "true" , it does not work. I expect that the OK button will be disabled and the popup will remain on the screen until one of the input options is selected.
eg.
$ionicPopup.prompt({
title: '<h3>BLAH</h3>',
subTitle: '<h3>Please select one of the following options:</h3>',
template: 'BLAH BLAH <br>\n\</span>',
scope: $scope,
buttons: [
{ text: '<b>OK</b>',
type: 'button-positive',
attr: 'ng-disabled="true"',
onTap: function(res) {
return true;
}
}}
]
}).then(function(res) {
;
}, function(err) {
console.log('Err:', err);
}, function(msg) {
console.log('message:', msg);
});
source
share