1

It's possible to use property as HTML tag name? Something like this or similar:

<{{property.name}}>Hello world</{{property.name}}>

2 Answers2

1

That's not supported. Tags and attributes used as component or directive selector need to be added statically.

If you want to add components dynamically you can use ViewContainerRef.createComponent like demonstrated in Angular 2 dynamic tabs with user-click chosen components

Community
  • 1
  • 1
Günter Zöchbauer
  • 623,577
  • 216
  • 2,003
  • 1,567
0

no you can use like this

<label>{{property.name}}</label>

or

<htmltag>{{property.name}}</htmltag>
jitendra varshney
  • 3,484
  • 1
  • 21
  • 31