我在离子1中,我正在弹出一个弹出窗口。我想知道如果没有数据进入textarea,我怎么能把保存按钮变成灰色。所以基本上当你无法点击它时,它会变灰。 Javascript在下面。提前谢谢!
$scope.popUpInput = function(task){
var myPopup = $ionicPopup.show({
template: '<textarea style="width:100%; height:10em"
placeholder="Enter feedback here..." ng-model="data.input"></textarea>',
title: task,
subTitle: getTaskDesc(task),
scope: $scope,
buttons: [
{ text: 'Cancel' },
{
text: '<b>Submit Feeback</b>',
type: 'button-calm',
onTap: function(e) {
if(!$scope.data.input)
e.preventDefault()
else{
$ionicPopup.alert({title: 'We appreciate your feedback', template: 'If you have any concerns feel free to contact the Plaigo team at plaigo.com'})
}