I was curious to know as to how to generate a heading tag dynamically in Angular. Let me explain you the whole scenario. Suppose I have a client-server setup wherein I am able to retrieve data from the server in the form of json and in that data there is a field named "size". Now, what I wish to know is that is there any way in which I can generate the heading tag dynamically using the size data that I have in my json? For e.g. if I get the size: 2 from my json data then the corresponding heading tag should be <h2>.
<li *ngFor="let data from jsonData" [ngSwitch]="data.type" class="list-group-item">
<h(what code should go over here to generate the heading accoring to the size parameter passed?) *ngSwitchCase="'SomeType'">{{data.text}}</h(?)>
</li>