C
C
Coder3212017-01-04 22:29:07
JavaScript
Coder321, 2017-01-04 22:29:07

What is the equivalent of element.append() in Angular 2?

What is the equivalent of element.append() in Angular 2?
How to insert custom template with binding in Angular 2 using directive?

<!--Пример шаблона-->
<div>{{variable}}</div>

In the first angular, this was done using $compile and append, how to do this in the second?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Nagorny, 2017-01-04
@esvils

See if stackoverflow.com/questions/34855718/angular-2-app...

R
Ruslan Lopatin, 2017-01-05
@lorus

In the second angular, you can also use the compiler. But it's a bit more complicated: Dynamyc Component for Angular 2. How to create dynamic components and templates?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question