Compile dynamic HTML in Angular 4/5- something similar to $compile in Angular JS

前端 未结 4 1400
夕颜
夕颜 2020-11-27 16:54

I wanted to receive an HTML data via service call to server(this is for sure. I cannot keep templates in local) and manipulate them internally on how to show it(either as a

4条回答
  •  执笔经年
    2020-11-27 17:30

    Checkout the npm package Ngx-Dynamic-Compiler

    This package enables you to use angular directives like *ngIf,*ngFor , Databinding using string interpolation and creates a truly dynamic component at runtime. AOT support has been provided.

提交回复
热议问题