Hey there, I am working with a model variable called "name" that is linked to a span element like this:
<input type="text" ng-model="name">
<span ng-bind="name"></span>
My goal is to display the text entered in the input field without removing any spaces.
To achieve this, I found a solution by adding a CSS property:
.allow-spaces{
white-space:pre;
}
Now, when entering a value like "hello ooo buddy", it will be displayed exactly the same in the span. However, it won't display leading spaces like " hello buddy" appears as "hello buddy". Can anyone provide a solution for this? Thank you!