I have a doubt regarding <ng-container>
and <ng-template>
. Which is better to be used in our code. I've read an answer regarding the difference between this two tag over here on SO. It says Angular compiler de-sugars(make it a bit complex) by converting
`<div *ngFor="let person of persons"></div>`
to this
<ng-template ngFor let-person="$implicit" [ngForOf]="persons">
<div>...</div>
</ng-template>
So my concern is <ng-template>
will affect the rendering performance in the browser as compared to <ng-container>
and Which of from these 2 should be given preference?