I've created an app-wall template and I'm seeking advice on whether to use
<app-brick *ngFor="..."></app-brick>
or a <app-bricks>
element with an *ngFor inside its own template. Is there a recommended best practice for this scenario, or does it vary depending on the specific case?
@Component({
selector: 'app-wall',
template: `
<app-brick *ngFor="let brick of bricks"></app-brick>
or
<app-bricks></app-bricks>
`
})
@Component({
selector: 'app-brick',
template: '<div> I'm a brick! </div>'
})
@Component({
selector: 'app-bricks',
template: '<div *ngFor="let brick of bricks"> I'm a brick! </div>'
})