在这里,我正在尝试使用ajax调用而不刷新我的页面,但请致电modelpopup为此,我努力
@Ajax.ActionLink("CheckOut", "EditMasterDatadetails", "Home", new { Id = _objMaster.Id },
new AjaxOptions
{
HttpMethod = "GET",
//InsertionMode = InsertionMode.Replace,
InsertionMode = InsertionMode.InsertAfter,
UpdateTargetId = "myModal",
OnBegin = "OpenEditDialog()"
//OnComplete = "ShowPopup",
//OnSuccess = "showModal"//"showModal"
}, new {
@class = "btn btn-primary btn-lg",
@id = "chkOut"
})
我的jQuery代码是
function OpenEditDialog(){
$('#MyModel').modal('show');
}
但是,当我单击链接时,即使我的代码也没有达到娱乐
您可以通过数组或对象上的 ng-repeat
,而不是返回什么都没有返回的函数(不确定)。
您的控制器需要准备可访问的数组
$scope.YearList = [];
for (var Y = 1991; Y <= 1995; Y++) {
$scope.YearList.push(Y);
}
,NG重复越过YearList
<select class="form-control">
<option ng-repeat="Year in YearList" value="{{Year}}">{{Year}}</option>
</select>