Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProgressBar: Templating does not work properly #16102

Closed
friefa opened this issue Jul 25, 2024 · 2 comments
Closed

ProgressBar: Templating does not work properly #16102

friefa opened this issue Jul 25, 2024 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@friefa
Copy link

friefa commented Jul 25, 2024

Describe the bug

The display of the custom labeling (templating) of the ProgressBar does not work as expected.
In the StackBlitz preview from the documentation it works, unfortunately I cannot reproduce this functionality.

Environment

Windows 10, Visual Studio Code, Chrome

Reproducer

No response

Angular version

18.1.0

PrimeNG version

17.18.6

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

20.16.0

Browser(s)

Chrome, Edge

Steps to reproduce the behavior

  1. Create Angular project with ng new pbar-test --no-standalone
  2. Choose SCSS and disable pre rendering
  3. Install primeng with npm install primeng
  4. Add ProgressBarModule to AppModule
  5. Copy and paste ProgressBar-Template of prime ng docs:
<div class="card">
     <p-progressBar [value]="50">
         <ng-template pTemplate="content" let-value> 
         <span>{{value}}/100</span>        
         </ng-template>
     </p-progressBar>
</div>

It shows 50% inside the progress bar.

Expected behavior

It is expected that it will say 50/100.

@friefa friefa added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 25, 2024
@0x426
Copy link

0x426 commented Nov 5, 2024

Absolutely right, it's definitely a bug. Small workaround for now:

<p-progressbar value="50" [showValue]="true" unit=" / 100 Bananas" />
or
<p-progressbar value="50" [showValue]="true" [unit]="' / ' + myMaxData + ' Bananas'" />

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation and try the latest PrimeNG version(v19). If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants