我有与ASP.net MVC5绑定的模型控件
@Html.TextBoxFor(model => model.OriginLocation.City,new { @class = "form-control",data_ng_model = "address1.City",test_change = "" })
因此,当页面加载文本框输入的值被绑定并且应该显示来自具有Razor绑定控件的服务的值,后者我可以操纵该值来改变该控件的角度模型.
我所拥有的是文本框加载空.
我查看源时看到的值但是没有显示.
<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' };