8

I want to remove the title area from the ionic popup completely. I removed the title tag and tried. but still can see the title space visible. Here is my code.

 var registerPopup = $ionicPopup.show({

        templateUrl: 'templates/register_popup.html',

        scope: $scope

    });

Even if I remove the title tag completely, the title area is still visible with a blank space as shown in the image below. I want to remove the entire title space from the ionicPopup. How can I get it? what changes are to be made in the code?

enter image description here

Community
  • 1
  • 1
Ravitheja
  • 761
  • 1
  • 8
  • 24

1 Answers1

21

It is because the title is wrapped inside .popup-head which takes the space.

First add a value of custom-class to cssClass property in the Popup object.

var registerPopup = $ionicPopup.show({

    templateUrl: 'templates/register_popup.html',
    cssClass: 'custom-class', // Add
    scope: $scope

});

You can hide it using custom CSS.

.custom-class .popup-head {
  display: none;
}
m4n0
  • 29,823
  • 27
  • 76
  • 89
  • Thank you :) Also how did you find out ? it is not mention in the doc – julio Jul 21 '15 at 08:54
  • This is too broad to be mentioned in the docs :) We can get help from the other things mentioned in the docs and implement it. – m4n0 Jul 21 '15 at 09:37