title: Is it possible to use the reference value of ion select
body: <p>I'm new to ionic and angular. Is it possible to use the reference value of <em><strong>ion-select-option</strong></em> so that it can be used in <em><strong>ion-input</strong></em>. I'm using id as a [value] from local SQLite database. The idea is whenever I select from ion-select the value in ion-input would be filled. When I tried using the {{dev.price}} in the ion-input it didn't get me the value. here is my html code.</p>
  <pre><code>&lt;ion-item&gt;
    &lt;ion-label&gt;Item Type&lt;/ion-label&gt;
    &lt;ion-select [(ngModel)]=&quot;product.creator&quot;&gt;
      &lt;ion-select-option 
      *ngFor=&quot;let dev of devices&quot; [value]=&quot;dev.id&quot;&gt;
         {{ dev.name }} {{ dev.price }}
      &lt;/ion-select-option&gt;
    &lt;/ion-select&gt;
  &lt;/ion-item&gt;
  &lt;ion-item&gt;
    &lt;ion-label&gt;
      Item Price
    &lt;/ion-label&gt;
    &lt;ion-input disabled  
    [(ngModel)]=&quot;product.amount&quot;&gt;
    {{ dev.price }}
  &lt;/ion-input&gt;
  &lt;/ion-item&gt;
  </code></pre>
  <p>and here is my SQLite database</p>
  <pre><code>CREATE TABLE IF NOT EXISTS device(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT UNIQUE, info INTEGER,price INTEGER, amount INTEGER, total INTEGER);
  
  CREATE TABLE IF NOT EXISTS product(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, creatorId INTEGER, item_date DATE, price INTEGER, amount INTEGER, total INTEGER NOT NULL);
  </code></pre>
  <p>and here is my database.service.ts</p>
  <pre><code>    import { Platform } from '@ionic/angular';
  import { Injectable } from '@angular/core';
  import { SQLitePorter } from '@ionic- 
  native/sqlite-porter/ngx';
  import { HttpClient } from 
  '@angular/common/http';
  import { SQLite, SQLiteObject } from '@ionic- 
  native/sqlite/ngx';
  import { BehaviorSubject, Observable } from 
  'rxjs';
  
  
  
  export interface Dev {
  id: number,
  name: string,
  info: number,
  price: number,
  amount: number,
  total: number,
  }
  
  @Injectable({
  providedIn: 'root'
  })
  export class DatabaseService {
  private database: SQLiteObject;
  private dbReady: BehaviorSubject&lt;boolean&gt; = new 
  BehaviorSubject(false);
  
  devices = new BehaviorSubject([]);
  products = new BehaviorSubject([]);
  
  constructor(private plt: Platform, private 
  sqlitePorter: SQLitePorter, private sqlite: 
  SQLite, private http: HttpClient) {
  this.plt.ready().then(() =&gt; {
    this.sqlite.create({
      name: 'devices.db',
      location: 'default'
    })
    .then((db: SQLiteObject) =&gt; {
        this.database = db;
        this.seedDatabase();
    });
    });
   }
  
  async loadProducts() {
  let query = 'SELECT product.name, product.id, 
  product.item_date, product.amount, 
  product.price, product.total, device.name AS 
  creator FROM product JOIN developer ON 
  device.id = product.creatorId';
  const data = await 
  this.database.executeSql(query, []);
  let products = [];
  if (data.rows.length &gt; 0) {
    for (var i = 0; i &lt; data.rows.length; i++) {
      products.push({
        name: data.rows.item(i).name,
        id: data.rows.item(i).id,
        creator: data.rows.item(i).creator,
        item_date: data.rows.item(i).item_date,
        amount: data.rows.item(i).amount,
        price: data.rows.item(i).price,
        total: data.rows.item(i).total,
      });
    }
   }
   this.products.next(products);
   }
  
  addProduct(name: any, creator: any, item_date: 
  Date, amount: number, price: number, total: 
  any) {
  let data = [name, creator, item_date, amount, 
  price, total];
  return this.database.executeSql(`INSERT INTO 
  product (name, creatorId, item_date, amount, 
  price, total) VALUES (?, ?, ?, ?, ?, ?)`, 
  data).then(data =&gt; {
   this.loadProducts();
  });
  }
  </code></pre>