This example walks you through the process of creating Angular Components and adding them to a module.
-
Open
src/app/app.component.ts
and perform the TODO tasks in the file. -
Open
src/app/child.component.ts
and perform the TODO tasks in the file. -
Go back to
src/app/app.component.ts
and add the following tag into its template immediately after the existing
tag:<child-component></child-component>
-
Open
src/app/app.module.ts
and perform the TODO tasks in the file. -
Open
index.html
and note that<app-root>
is defined in it. -
Once you have the previous TODO tasks completed you should see the parent and child components displayed.