Declarative alert, confirm, and so on

When coming to Ionic from Onsen-UI I was quite surprised to see how much code was required to show a simple alert, or a confirmation dialog. Why not have a declarative API like

   ionic.alert('lorem ipsum')
   ionic.dialog('are you sure',['yes','no'], callback)

?

really…

https://onsen.io/v2/api/react/Modal.html#main
https://onsen.io/v2/api/react/AlertDialog.html#main

1 Like

Yes, these are similar. But these are implemented there too:
https://onsen.io/v2/api/js/ons.notification.html

You are comparing apples and oranges, that is the core javascript api and Ionic also has a core javascript API…

1 Like