0
引導模式我有簡單的角控制器,用於我的模態窗口故障與角
var ModalDialogCtrl = function ($scope) {
$scope.data;
};
而且我從D3的動態生成的數據(我不能使用該內容NG-點擊)。我設置的事件在D3的onclick是這樣的:
.on("click", function(d, i) {
//get some data
angular.element($('#modalDialog')).scope().data = data;
$('#modalDialog').modal('show');
})
對話框顯示沒有任何數據,但是當我關閉它,數據顯示在它(關閉動畫與模態數據!)。當我的對話框顯示時,如何更新數據?!
dialog second opening and first hiding
而且我的對話框代碼:
<div class="wrapper">
<span>
<span class="modal-table-header" data-dismiss="modal" ng-click='cancel()'>close</span>
<a class="close" data-dismiss="modal" ng-click='cancel()'><span class="icon-remove-circle icon-bold"></span></a>
</span>
</br> </br>
<table style="display: list-item;">
<thead>
<tr>
<th>{{data[0].headerName}}</th>
<th ng-repeat="subData in data[0].subData">{{subData.category}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in data">
<td>{{item.header}}</td>
<td ng-repeat="subData in item.subData">{{subData.value}}</td>
</tr>
</tbody>
</table>
</div>
哦。現在一切正常!謝謝 –