How to do it...

Perform the following instructions:

  1. Create a new MyComponent app using the blank template, as shown, and go into the MyComponent folder:
$ ionic start MyComponent blank 
$ cd MyComponent 
  1. Open the ./src/pages/home/home.html file and replace the content with the following code:
<ion-header>  <ion-navbar>    <ion-title>      Pizza App    </ion-title>  </ion-navbar></ion-header><ion-content padding>  <ion-card>    <ion-card-header>      App Homepage    </ion-card-header>    <ion-card-content>      Please start to order your pizza now!    </ion-card-content>  </ion-card>  <my-component></my-component></ion-content>

This is your root page containing <my-component>, which will be defined later.

  1. Open ./app/pages/home/home.ts for editing globally with the following ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.