Search code examples
angularcomponentsangular9

Angular 9 Multiple components


Where should I have my app-menu component. Should I add it in the app.component.html or render it in index.html?

@Component({
    selector: 'app-menu',
    templateUrl: './menu.component.html',
    styleUrls: ['./menu.component.css']

Solution

  • In app.component.html you will have your component like this:

    <app-menu></app-menu>