3

I would like to pass typescript variable to style, I dont know if it's possible, there is code:

<tr *ngFor="let app of data">
    <div class="progress_bar" style="width: {{app.applicationProgress}}%;"></div>
</tr>

My app.applicationProgress is set(checked)

1 Answer 1

8

Use the ngStyle directive. Documentation

Updated code:

<div class="progress_bar" [ngStyle]="{'width': app.applicationProgress + '%'}"></div>
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.