javascript - Angular 2 : Call component dynamically -


i build ionic 2 app use angular 2. want call component dynamically. want know if it's possible write somethink :

<my-comp-[var]><my-comp-[var]/> 

for example in ts file :

component: string = 'home'; 

and in html file :

<my-comp-{{component}}><my-comp-{{component}}/> 

what best way somethink ?


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -