我无法使用智能表选择行。我添加了JSON和HTML。打开模态窗口的代码
$scope.getSerialData =函数(){
var serialNo ='700001117961';// $scope.asupFormData.asup_serial_no;
$http({
method: 'GET',
url: getAsupSerialData+serialNo+'/',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
} // set the headers so angular passing info as form data (not request payload)
}).success(function(data) {
$scope.rowCollection1 = JSON.parse(data);
$scope.rowCollection = $scope.rowCollection1.result;
console.log($scope.rowCollection)
}).error(function(data){
});
$scope.close = function() {
uibModalInstance.dismiss('cancel');
};
$scope.saveForms = function(){
uibModalInstance.dismiss('cancel');
}
var uibModalInstance = $uibModal.open({
templateUrl: 'asupsearchform.html/',
scope: $scope,
controller:'MainCtrl',
windowClass: 'device-modal-window'
});
}
rowCollection
是
[["2017032517580346","HA Group Notification (WEEKLY_LOG) NOTICE"],
["2017031818200373","HA Group Notification (WEEKLY_LOG) NOTICE"],
["2017031818200372","HA Group Notification (WEEKLY_LOG) NOTICE"]]
$scope.getSerialData正在从某个打开模态窗口的链接中被调用
HTML
<table st-table="rowCollection" class="table" >
<thead>
<tr>
<th st-sort="firstName">ID</th>
<th st-sort="lastName">Title</th>
</tr>
</thead>
<tbody>
<tr st-select-row="row" st-select-mode="multiple" ng-repeat="row in rowCollection" ng-click="doSomeStuffToSelected(row)">
<td>{{row[0]}}</td>
<td>{{row[2]}}</td>
</tr>
</tbody>
</table>
帮帮忙吧。使用静态代码选择时,当我在modalwindow下使用它时,就会发生fine.This。
https://stackoverflow.com/questions/43112425
复制