Please take a look:
1) moved the following tags out from index.html into app.component.html (check two files: index.html and app.component.html below):
<app-my></app-my>
<app-my2></app-my2>
2) and since MyComponent component (selector app-my) and My2Component component (selector app-my2) are now enclosed into parent AppComponent component (as childs) we do not bootstrap them and so we remove them from bootstrap property in app.module.ts file:
Please take a look: 1) moved the following tags out from
index.html
intoapp.component.html
(check two files:index.html
andapp.component.html
below):2) and since MyComponent component (selector
app-my
) and My2Component component (selectorapp-my2
) are now enclosed into parent AppComponent component (as childs) we do not bootstrap them and so we remove them frombootstrap
property inapp.module.ts
file: