Button documentation contains incorrect template name for loading icon template #17462
Open
2 of 4 tasks
Labels
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Describe the bug
Looking at the v19 documentation found at https://primeng.org/button lists "loadingicon" as "Custom template of loadingicon."
Looking at the source code, this should be simply "loading" as per https://github.com/primefaces/primeng/blob/248249e44338817e2d1f3b6d4ec72d9f24c35280/packages/primeng/src/button/button.ts look for loadingIconTemplate.
It looks like there is interface at https://github.com/primefaces/primeng/blob/248249e44338817e2d1f3b6d4ec72d9f24c35280/packages/primeng/src/button/button.interface.ts look for ButtonTemplates.
Since this interface (ButtonTemplates) does not seem to be enforced, there is a mismatch between documentation and source code.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
Not sure about the best way to fix this... Maybe eradicate "magic strings" globally and replace @ContentChild('loading') with reference to interface properties somehow or find another way to generate documentation?
Reproducer
https://stackblitz.com/edit/github-l64x4naa?file=src%2Fapp%2Fapp.component.html
Environment
Mac M1 ARM64
Angular version
18,19
PrimeNG version
v19
Node version
ANY
Browser(s)
Any
Steps to reproduce the behavior
Expected behavior
Observe loading icon template to be used instead of default loading icon
The text was updated successfully, but these errors were encountered: