How to load conditionally templateUrl html file in Angular 5 component

前端 未结 2 1760
一个人的身影
一个人的身影 2021-02-09 00:31

There is one scenario in my project, Consider, I have one testDynamic component

@Component({
    templateUrl: \"./test-dynamic.html\", // Need to override this f         


        
2条回答
  •  北恋
    北恋 (楼主)
    2021-02-09 01:28

    refer the following link, this is a good example of dynamic templateUrl

    Angular 2/4 component with dynamic template or templateUrl

提交回复
热议问题