Dynamic template in templatURL in angular2

前端 未结 5 1007
醉话见心
醉话见心 2020-11-30 06:52

I have been using ng-include in angular 1 whenever I had to include a tamplate dynamically in the page.

Now how to acheive this in angular 2. I have tried searching

5条回答
  •  心在旅途
    2020-11-30 07:20

    Actually angular 2 has not featured this in the current build. Also as per the links added, I don't think this feature will be included.

    A piece of javascript to dynamically add template using ajax call may be used.

    Or possibly in future a dynamic template loader library will be available for use.

提交回复
热议问题