When the angular model is bound to the input, angular does not seem to update the value if space is added. Even if the model is being viewed, the value is still not updated.
I created JS Fiddle to demonstrate this problem. Enter a line and pay attention to the values ββin the update borders. However, add a space at the end of the line and the value will not be updated. Is there a way to make angular also observe spaces?
Specific code:
View
<div ng-controller="MyCtrl"> <input data-ng-model="inputValue"> <p>This value: ----<span data-ng-bind="inputValue"></span>----</p> </div>
controller
function MyCtrl($scope) { $scope.inputValue = 'Superhero'; });
javascript angularjs
Eric Di Bari
source share