I have controls bound to ASP.net MVC5
@Html.TextBoxFor(model => model.OriginLocation.City, new { @class = "form-control", data_ng_model = "address1.City", test_change = "" })
Thus, when a page loads a text field input value, it is bound and should display the value coming from the service using Razor-related controls, the latter I can manipulate this value, which changes the angular model for this control. I have a text box loaded empty. I see the value when viewing the source, but it is not displayed.
<input class="form-control ng-pristine ng-valid" data-ng-model="address1.City" data-val="true" data-val-length="The field City must be a string with a maximum length of 50." data-val-length-max="50" id="OriginLocation_City" name="OriginLocation.City" test-change="" type="text" value="Manheim">
js
app.controller('LocationCtrl', ["$scope",
function ($scope) {
$scope.address1 = { Label: 'address1' };
source
share