Today, using AngularJs, this line of code will work on the key-up event:
<input id="place" type="text" ng-model="place" />
<span>{{place}}</span>
But if I change the value of the input using a script, such:
$('#place').val('new value');
than nothing happens and the model doesn't change.
Any idea how to overcome this problem?
changing a value programatically of a form element does not trigger events, you need to trigger them after you set the value
$('#place').val('new value').change();
Am not familiar enough with angular to know if this is the data binding event needed