Ng2Bs3ModalModuleを使用してコンポーネントをポップアップ表示しています。ここでは、このために、私は、以下の方法を使用しています:角度2のコンポーネントに値を渡す
従う
<modal #modal>
<modal-header [show-close]="true">
<h4 class="modal-title">Update Job Service</h4>
</modal-header>
<modal-body>
<app-job-service-edit></app-job-service-edit>
</modal-body>
</modal>
はその後、私は(以下model.openを使用して、このモデルを開くと、私はマスターコンポーネントのテンプレートを作成する)イベント(クリック)で。
<button type="button" class="flat btn-danger" name="table_records" (click)="modal.open()">EDIT</button>
ここで、上記のボタンをクリックしてコンポーネントに値を渡す必要があります。どうすればいいですか?
ありがとうございます。
あなたがsemicolumnを使用し、スコープに値を設定することができます。 モーダルコンポーネントがアクセスできる 'EDIT ' – Sravan
'
投稿で私の回答を確認してください http://stackoverflow.com/questions/42385142/pass-data-from-one-component-to-another-and-reflect-in-view/42386408#42386408 –