Set JSON string data in @Component template

hey all,
i want to make form page full dynamic so i want to set the template where data comes from api call in json format string
how can we set JSON data string in @Component template

For example:-

@Component({
  selector: 'page-home',
  template: data
})
export class HomePage {
 data = `<ion-input [(ngModel)]='addProfileData.Name' formControlName='Name' type='text'></ion-input>`;   //this data is coming from json string
  constructor(public navCtrl: NavController) {
 
  }

now i know i can put it directly into template variable but i am making it dynamic so i want it to set it via variable

pls help ASAP
thanks

You can’t do it in component with ionic component only pure html.
If you want to use ionic component (like ion-input) you have to write all logic in template and use ngIf for each item type.