How does Ionic determine where to insert HTML templates?

I recently started working with Angular and Ionic. So far I’ve been learning Angular and according to the documentation on it uses the selector property to create and insert and instance of the component.

However when looking at ionic and the sample app I see that the selector property is used, however I cannot find tags which match it in any of the parent templates. So how does ionic know where to insert new components? I’ve been trying to research the topic, however I’m only finding usage examples and not an explanation.

What exactly are you looking for?

It all starts in index.html with <ion-app>. Selector for that is in vendor.js. Then a lot of Ionic internal stuff is happening and you end up in src/app/. There app.module.ts leads to app.component.ts with MyApp. This contains rootPage which is rendered in app.html. And from there Ionic routing takes over when you navigate to other pages.