Please can someone show me how to make a simple modal in a tabbed layout?


#1

Please.

I just don’t see how I can do it. The docs are not clear at all.

I could do this easily in Ionic 1 but in Ionic 2 I just can’t work out where to put the code in the ts file.

None of the examples show this and everywhere they have code I already have other code.

eg. in the modal docs there is a link to the source code, where there is this:

constructor(public modalCtrl: ModalController) { }

But in the code for the page in the tabbed starter at this point in the code you have this:

constructor(public navCtrl: NavController) {

I just can’t understand how or why this has to be so hard. In Ionic 1 it’s explained easily, but now I’m just unable to really do anything with Ionic 2.


#2

I would suggest going through the entire Hall of Heroes, but for this particular question, check out the DI docs.


#3

Thanks, I’ll do this.


#4

Going through this.

Very useful! Thanks so much.

This should be on every budding Angular/Ionic dev’s list.


#5

I still can’t work out the modals!