How to reuse template HTML block in Angular?

后端 未结 5 936
野趣味
野趣味 2020-12-23 09:28

Lets suppose we have html block in file:

Text

How can I reuse this html code below in the same file, I m

5条回答
  •  囚心锁ツ
    2020-12-23 09:53

    You can create a custom html-tag using angular then import that component in your module that wants to use those custom-tags. Then you'll be allowed to use the same tag in your html page. Created a small example that can maybe help you understand ?

    https://stackblitz.com/edit/angular-stackoverflow

提交回复
热议问题