Jay
Jay

Reputation: 25

How Can I Add a Character in ng-style form in DIV?

I have tried NG-STYLE and apparently it seems to be working. However, I need to put the percentage character (%) after bringing the data from the CONTROLLER.

<div class="progress progress-mini">
  <div ng-style="{'width' : project.project_completion '%'}">
  </div>
</div>

However, I think I have put that % sign in a wrong way.

What could be the best practice to put a character after bring the data from the Controller?

Thank you in advance!

Upvotes: 0

Views: 44

Answers (1)

Gaurav Srivastava
Gaurav Srivastava

Reputation: 3232

You have used wrong concatenation:

<div class="progress progress-mini">
  <div ng-style="{'width' : project.project_completion+'%'}">
  </div>
</div>

Upvotes: 2

Related Questions