I have a problem when using javascript with angularJS. I have a text field with id="longitude".
<input type="text" data-ng-model="newwarehouse.longtitude" id="longitude"/>
I set the value of this field by javascript.
var longitudeValue = document.getElementById('longitude');
longitudeValue.value = event.latLng.lng();
But when I process the controller of Angular JS can't get the value of this field except I type manual the value for this field. What should I write in javascript to set the model value of this field? Thanks everyone.