[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Current behavior
Button with pButton directive and icon does not have css class ".p-button .p-button-icon-left" if the text is set after the button has been initialized without text. With the p-button it works as expected.
Expected behavior
The css class for the icon should be added if the button has text.
Minimal reproduction of the problem with instructions
Use button with pButton directive and icon. Set Text after it has been initialized.
What is the motivation / use case for changing the behavior?
I want to add the text for the button dynamically.
I'm submitting a ...
Plunkr Case (Bug Reports)
https://stackblitz.com/edit/github-akgkdp?file=src/app/app.component.html
Current behavior Button with pButton directive and icon does not have css class ".p-button .p-button-icon-left" if the text is set after the button has been initialized without text. With the p-button it works as expected.
Expected behavior The css class for the icon should be added if the button has text.
Minimal reproduction of the problem with instructions Use button with pButton directive and icon. Set Text after it has been initialized.
What is the motivation / use case for changing the behavior? I want to add the text for the button dynamically.
Angular version: 11.0.0
PrimeNG version: 11.3.0
Browser: [Chrome 91 | Firefox 88 | Edge 90]
Language: TypeScript 4.0.2