1

I'm in ionic 1 and I am making a popup. I was wondering how I could make the grey out the save button when there is no data entered into the textarea. So basically when you can't click on it it is grayed out. The Javascript is underneath. Thank you in advance!

$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'})
    }  
4

0 回答 0