如何更改组件类中primeNG中按钮的标签

时间:2018-05-17 12:10:12

标签: angular primeng

<button pButton type="button" ></button>

需要将组件类中的标签设置为“传递地址”,而不是使用html标记中的label属性。

1 个答案:

答案 0 :(得分:1)

只需将您的类属性绑定到label

pButton属性即可

<强> HTML

<button pButton type="button" label="{{customLabel}}"></button>

<强> TS

customLabel = 'My custom label';

请参阅StackBlitz

相关问题