下面的代碼在首次啓動對話框時似乎不起作用。未使用角度範圍填充Jquery對話框
$scope.ke_location_channel_summary = function (region_id, region) {
$scope.region_data = $scope.location_channel_data[region_id];
killed_enquiries_services.open_dialog('popup', region);
$('#popup').html($('#location_channel_summary').html());
};
但它與下面的變化工作
$scope.ke_location_channel_summary = function (region_id, region) {
$scope.region_data = $scope.location_channel_data[region_id];
window.setTimeout(function() {
killed_enquiries_services.open_dialog('popup', region);
$('#popup').html($('#location_channel_summary').html());
}, 0);
};
代碼的HTML一邊是
<div id="location_channel_summary" style="display: none">
<table class="standardTable">
<tr>
<th class="left-col-heading">Channel</th>
<th class="center">Qty</th>
<th class="center">Nights</th>
<th class="center">Value</th>
<th class="center">Avg Value</th>
<th class="center">ADR</th>
</tr>
<tr ng-repeat="ctype in contacttypes | orderBy:['sort_order']">
<td style="width:25%;" class="left-col-td">{{ctype.name}}</td>
<td ng-repeat="column in columns" class="center">{{region_data[ctype.id][column]}}</td>
</tr>
</table>
我想顯示在股利內容jquery對話框。該表返回的空白內容沒有setTimeOut。這是爲什麼?