Ionic 2 Tutorial MyApp Class

The Ionic 2 tutorial starter template contains the class MyApp in www/app.js. I don’t understand where this class gets instantiated and if there is a naming convention for this main app class.

You can change to your desired name,For example:IonicApp、TestApp…

it gets instantiated by @APP and of index.html

Thanks for your reply.

In index.html it has. <ion-app></ion-app>

And @App decorator only references the template and there is no selector property. So I still don’t see what is bootstrapping MyApp.


The decorator is implemented by ionic and does the bootstrapping of the angular app.
The selector can be overridden but defaults to ion-app see this if you care

Ionic expects one @App decorator against a class. The name of the class doesn’t matter. It looks for the selector ion-app and bootstraps.