We have a list of values being returned from the server. These values contains words like this :
"1 Black"
"1/2 Unavailable"
"3 Sky Blue"
The angular code is as follows:
<select class="someclass" [(ngModel)]="colorChoice">
<option *ngFor="let c of colorList" [ngValue]="c">{{c}}</option>
</select>
Since the above started removing all the spaces between the words, except for one space in between.
Something like "1 Black".
So I resorted to using ' ' in the code after getting the values from the server.
let tmp = respColorList.replace(/\s/g, ' ');
this.colorList.push(tmp);
Now this is showing " " inside the drop down.
I have also tried white-space: pre;
and also word-spacing: 5px;
How do I solve this. Thank you.