Answer the question
In order to leave comments, you need to log in
Is it possible to use other components inside a component in Angular?
Like this
<app-component1>
<app-component2></app-component2>
</app-component1>
Answer the question
In order to leave comments, you need to log in
In general, yes. It is necessary to indicate inside the first component
where the second component will fall
https://angular.io/tutorial
See example https://stackblitz.com/angular/arpdjrkqmxj
You set a selector to a component
@Component({
selector: 'app-hero-detail',
templateUrl: './hero-detail.component.html',
styleUrls: ['./hero-detail.component.css']
})
<app-hero-detail [hero]="selectedHero"></app-hero-detail>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question