I have some models being updated from a look-up. It is the 1st line that's not updating (but the other models are updated correctly). I tried wrapping it in an $apply but that made matters worse:
function mapRequestorToForm() { //PrimaryCtyhocnOrInnCode binding not updating //$scope.$apply(function() { dmpe.form.PrimaryCtyhocnOrInnCode = dmpe.requestor.primaryInnCode; dmpe.form.hotelName = dmpe.requestor.hotelName; dmpe.form.requestor = dmpe.requestor; //}); } Here's the input element. Funny thing, the pre element is displaying the correct value.
<label for="primaryCtyhocn">Primary Inn Code/ CTYHOCN</label> <input type="text" id="primaryCtyhocn" name="primaryCtyhocn" ng-model="dmpe.form.PrimaryCtyhocnOrInnCode" class="form-control required disabled-bg" disabled placeholder="Primary Inn Code/ Ctyhocn" ng-minlength="5" ng-maxlength="7" required /> <pre>PrimaryCtyhocnOrInnCode: {{dmpe.form.PrimaryCtyhocnOrInnCode}}</pre> this one is updated correctly (line 2 of the map method, using the same source object with similar disabled attributes:
<div class="col-md-4"> <label for="hotelName">Hotel Name</label> <input type="text" id="hotelName" name="hotelName" ng-model="dmpe.form.hotelName" class="form-control required disabled-bg" disabled placeholder="Hotel Name required" required /> </div>
disabledattribute? It feels like your code may have some JavaScript executing behind the scenes that's trying to set the value of that input text box and it's failing because of that attribute.dmpe.requestor.primaryInnCodeshould bedmpe.requestor.primaryCtyhocnOrInnCode& are you sure,if it isprimaryInnCode. does contain value?