Я хочу вручную скомпилировать некоторые HTML-содержащие директивы. Что эквивалентно $compile
в Angular 2?
Например, в Angular 1 я мог бы динамически скомпилировать фрагмент HTML и добавить его в DOM:
var e = angular.element('<div directive></div>');
element.append(e);
$compile(e)($scope);