title: How to pass Dynamic values to the modal using angular 2
body: <p>Hi here im having a dynamic data where displaying them in the form of buttons below is the code </p>
  
  <pre><code>              &lt;ng-container *ngFor="let data of mapData"&gt;
  
                  &lt;div *ngIf="data.OrderState==='1'" class="ds"&gt;
                    &lt;button [id]="data.DrId" class="btn btn-outline secondary"&gt;
                      {{data.Name}}
                    &lt;/button&gt;
                  &lt;/div&gt;
                &lt;/ng-container&gt;
  </code></pre>
  
  <p>now after the clicking the button which was dynamically generated i want to send the <strong>data.Drid</strong> *  <strong>data.Name</strong> to the modal input fields and how can i call the modal on dynamic button click pass these as 2 parameters and get that data on modal submit button </p>
  
  <p>below is bootstrap 4 modal code how i can apply in send param to this </p>
  
  <pre><code>&lt;!-- Button trigger modal --&gt;
  &lt;button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal"&gt;
    Launch demo modal
  &lt;/button&gt;
  
  &lt;!-- Modal --&gt;
  &lt;div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"&gt;
    &lt;div class="modal-dialog" role="document"&gt;
      &lt;div class="modal-content"&gt;
        &lt;div class="modal-header"&gt;
          &lt;h5 class="modal-title" id="exampleModalLabel"&gt;Modal title&lt;/h5&gt;
          &lt;button type="button" class="close" data-dismiss="modal" aria-label="Close"&gt;
            &lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;
          &lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="modal-body"&gt;
          ...
        &lt;/div&gt;
        &lt;div class="modal-footer"&gt;
          &lt;button type="button" class="btn btn-secondary" data-dismiss="modal"&gt;Close&lt;/button&gt;
          &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>