Any modal examples/demos?


#1

I’m looking for an example of how to use a Modal. Can’t seem to figure it out for whatever reason. The example in the docs isn’t very descriptive.

Just trying to do a simple “Forgot Password” modal.


Modal via including template?
#2

#3

Awesome thanks. Couple questions…

Why is the following needed on ModalCtrl? wouldn’t closeModal be inherited from AppCtrl:

$scope.close = function() {
  $scope.modal.hide();
};

#4

I just used ng-click="modal.hide()"


#5

I just updated to 0.9.25 and prefixed everything with ion- and in doing so the modal displays but you can still see the content in the background that it is overlaying.


#6

Yes you’re right about just using ng-click="modal.hide()". I added in the extra function for an example how the modal can have it’s own methods too.

Would you be able to update your code to the nightly build and see if you still have the transparent background issues? It looks like in 0.9.25 the method of enabling/disabling pointer events was causing a bug, but since then I’ve rewritten how that all works.

Please give the nightly build a shot and let me know if it fixed it for you, thanks:
http://code.ionicframework.com/#nightly


#7

appears to be fixed. thanks!


#8

thanks Adam for the link http://code.ionicframework.com
i saw it in https://github.com/driftyco/ionic-code but didn’t know where it was published :slight_smile:


#9

Hi,
I been working with Ionic for a while now but I’m still a bit of a noob because I don’t really fancy Angular.

So, I got this for my popup but it’s displaying a black screen when transitioning the slide up and down.

How can one fix this so it’s a transparent background as suppose to be and in the provided example?

My Transition: