3
我是angular2 + typescript中的新成員。我需要的按鈕,通過點擊實現確認模式表Angular2將數據傳遞到模態
這是表
<div style="margin-top: 10px">
<table id="recruitersTable" class="table table-striped center" [ngBusy]="data">
<tr>
<th>{{ 'RECRUITER_NAME_AND_SURNANE_COLUMN' | translate }}</th>
<th>{{ 'RECRUITER_CODE_COLUMN' | translate }}</th>
<th>{{ 'RECRUITER_ACTION_DOLUMN' | translate}}</th>
<th></th>
</tr>
<tr *ngFor="let recruiter of recruiters">
<td>{{ recruiter.Name }}</td>
<td>{{ recruiter.Code }}</td>
<td>
<a class="btn btn-xs btn-default" data-target="#confirm" role="button" data-toggle="modal">
<span class="glyphicon glyphicon-ban-circle"></span>
</a>
</td>
<td></td>
</tr>
</table>
</div>
這是確認模式
<div id="confirm" class="modal fade in" aria-labelledby="modallabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span></button>
<h3 id="modalLabael">Block recruiter</h3>
</div>
<div class="modal-body">
<h3 id="modalLabael">Are you sure that you want block this recruiter?</h3>
</div>
<div class="modal-footer">
<button class="btn btn-danger" data-dismiss="modal" aria-hidden="true">Cancel</button>
<button class="btn btn-success" (click)="BlockRecruiter(recruiter.code)">Block</button>
</div>
</div>
</div>
,我需要實現的功能通過點擊'成功'確認模態,但數據在另一個div。有人能解釋我嗎?
模式是單獨的組件還是同一個? – silentsod
單獨的組件, –