Ionic Popup


Ionic Popup : Ionic Popup service enables you to create popup windows which needs some action from user to continue. Basically there are three main popups alert box, confirm box and prompt box. The service $ionicPopup is used for creating the popups. Here in this tutorial we are going to explain the popup step by step with example and demo.


Ionic Popup

There are the following popups which ionic provides-

Ionic Alert Box

To create alert box in ionic the service $ionicPopup is used which is imported in controller. $ionicPopup.alert() creates the alert box.

Alert Box : Js Controller Code

Ionic Popup Alert Box:

Alert Box : Html Part :

Ionic Popup Alert Box:

Try it »

If you run the above example it will produce the output something like this –

Ionic popup Alert Box example demo

Ionic Confirm Box

To create Confirm box in ionic the service $ionicPopup is used which is imported in controller. $ionicPopup.confirm() creates the confirm box.

Confirm Box : Js Controller Code

Ionic Popup Confirm Box:

Confirm Box : Html Part :

Ionic Confirm Box:

Try it »

If you run the above example it will produce the output something like this –

Ionic confirm box example & demo

Ionic Show Popup

To create show popup box in ionic the service $ionicPopup is used which is required. $ionicPopup.show() is used to created Show popup in ionic.

Show Popup Box : Js Controller Code

Ionic Show Popup Box:

Show Popup Box : Html Part :

Ionic Show Popup Box:

Try it »

If you run the above example it will produce the output something like this –

Ionic Show Popup