I have a app-projects template which is a list of ProjectComponent.
For ProjectComponent. I have the app-project template.
<ul>
<li *ngFor="let project of projects">
<app-project></app-project>
</li>
</ul>
Component:
@Component({
selector: 'app-project',
templateUrl: './project.component.html',
styleUrls: ['./project.component.css']
})
export class ProjectComponent implements OnInit {
constructor(title: string, description: string, questions: string[]) { }
ngOnInit() {
}
}
So, now I want to iterate over the the individual projectComponents while applying their templates.
But I could not figure out how to do that: If I want to stick with the separate template I somehow would have to pass the item to the template.
I found that it would be possible for single properties via Inputs, but that does not help me much with this.