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のデータをクリックします。誰かが私を説明できますか?
あなたのモーダルコンポーネントを親コンポーネントに含まれている場合は、持つEventEmitterを使用することができますいずれか
モーダルは別のコンポーネントですか、同じものですか? – silentsod
別個の成分、 –