title: IONIC: Passing data from one directive to another
body: <p>I am using a drop down ionic-option to display all children from my database. I want the <em>Baby's id</em> from the object, <strong>babydata</strong> to be passed on to the <strong>ChildData</strong> object's *Baby's id** to be used in a seperate form. Here is the Code : </p>
  
  <pre><code>    &lt;ion-item&gt; 
    &lt;ion-label&gt;Child&lt;/ion-label&gt;
    &lt;!-- &lt;ion-icon name="happy" item-left&gt;&lt;/ion-icon&gt; --&gt;
    &lt;ion-select  okText="Select" cancelText="Dismiss" [(ngModel)]="ChildData.BabyProfile_idBabyProfile"&gt;
      &lt;ion-option *ngFor="let item of babydata" ng-value="item.idBabyProfile" &gt;
        &lt;p [innerHTML]="item.firstName"&gt;&lt;/p&gt;
        &lt;p [innerHTML]="item.lastName"&gt;&lt;/p&gt;
      &lt;/ion-option&gt;
    &lt;/ion-select&gt;
  &lt;/ion-item&gt;
  </code></pre>
  
  <p>However, when the form data is submitted, it gives me the following results as shown in the payload[  <a href="https://i.stack.imgur.com/mDPvY.png" rel="nofollow noreferrer">https://i.stack.imgur.com/mDPvY.png</a> ]</p>
  
  <p>Instead of giving me the ID, it gives me the firstname and lastname. How can I solve this so that I pass the the baby id from babydata  to ChildData. ?? </p>