NativeScript / nativescript-angular

Integrating NativeScript with Angular
http://docs.nativescript.org/angular/tutorial/ng-chapter-0
Apache License 2.0
1.22k stars 241 forks source link

Progress BackgroundColor From html not working #1305

Open bhavincb opened 6 years ago

bhavincb commented 6 years ago

i'm trying to style progress bar. while doing so if i apply styles from html file like done below playground then backgroundColor is not applied. https://play.nativescript.org/?template=play-ng&id=dcwgsP

but if i style progress using css then background-color works perfectly. here is playground link. https://play.nativescript.org/?template=play-ng&id=dcwgsP&v=2

tsonevn commented 6 years ago

Hi @bhavincb, I tested your scenario while using the below-demonstrated way for applying background color to the Progress inline in the HTML code and was unable to reproduce the issue.

  1. <Progress [value]="50" backgroundColor="red" maxValue="100"></Progress>

  2. <Progress [value]="50" style="background-color:red;" maxValue="100"></Progress>

  3. <Progress [value]="50" style.backgroundColor="red" maxValue="100"></Progress>

Make sure that the changes have been deployed on the device properly. Also, provide more info if you are reproducing the issue on iOs or Android

bhavincb commented 6 years ago

hii @tsonevn , currently i had tested issue on Android. i don't know if it exists on ios or not. please use below demonstrated way to reproduce the issue.

  1. <Progress [value]="50" class="prog" color="red" backgroundColor="blue" maxValue="100"></Progress> 2.<Progress [value]="50" class="prog" color="red" style.backgroundColor="blue" maxValue="100"></Progress>

if we use 1 inline html for Progress. then progress will have red color and light red color in background instead of blue color. but if we use second code and style it using css file or style object then progress will have red color and light blue color as background-color.

tsonevn commented 6 years ago

Hi, @bhavincb, I was able to reproduce the issue with the backgroundColor while using the second scenario. I am attaching Playground project, which demonstrates the issue.