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