Angular HTML binding

后端 未结 21 2632
暖寄归人
暖寄归人 2020-11-21 04:00

I am writing an Angular application and I have an HTML response I want to display.

How do I do that? If I simply use the binding syntax {{myVal}} it en

21条回答
  •  感动是毒
    2020-11-21 04:51

    You can also bind the angular component class properties with template using DOM property binding.

    Example:

    Using canonical form like below:

    Angular Documentation: https://angular.io/guide/template-syntax#property-binding-property

    See working stackblitz example here

提交回复
热议问题