请使用我张贴的这些更改。我希望这能解决你的问题。谢谢您。
$scope.GetFilter = function () {
var strZone = $('#SAPExecutive_R4GState').val();
var strUtility = $('#ddlUtility').val();
$scope.dtColumns = [
DTColumnBuilder.newColumn(null, '').renderWith(function (data, type, full) {
return '<input type="checkbox" class="check" data-object-id="' + full.objectid + '">'
}),
DTColumnBuilder.newColumn("MAINTENANCEZONENAME", "MAINTENANCEZONENAME"),
DTColumnBuilder.newColumn("MAINTENANCEZONECODE", "MAINTENANCEZONECODE")
]
$scope.dtOptions = DTOptionsBuilder.newOptions().withOption('ajax', {
method: "POST",
url: AppConfig.PrefixURL + "/App/GetMPFilter",
dataType: 'json',
data: "{strZone:'" + strZone + "',strUtility:'" + strUtility + "'}",
headers: { "Content-Type": "application/json; charset=utf-8" }
})
.withPaginationType('full_numbers')
.withDisplayLength(10);
}
});
下面是单击按钮的简单示例:
<body ng-controller="MainCtrl">
<p>Hello {{name}}!</p>
{{msg}}
<a ng-href='#here' ng-click='go()' >click me</a>
<div style='height:1000px'>
<a id='here'></a>
</div>
<h1>here</h1>
</body>
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.go = function() {
$scope.msg = 'clicked';
}
});