Skip to content

angular1x 有 $compile angular6 有什么方法可以编译带指令的字符串? #83

Open
@YeahPotato

Description

@YeahPotato
var e = angular.element('<div directive></div>');
element.append(e);
$compile(e)($scope);

angular6 中有没有类似的方法;

<div [innerHTML]="htmlString"></div>
var htmlString = '<span ngFor="let i of [1,2,3]"></span>'

有什么方法可以解析ng 指令?

Metadata

Metadata

Assignees

No one assigned

    Labels

    讨论欢迎大家继续参与讨论,征集各方面的观点

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions