1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

How Well Should Interface Definition Match Database Table?

Discussão em 'Angular' iniciado por Nick, Outubro 6, 2024.

  1. Nick

    Nick Guest

    Would love an answer from an Angular ninja. I have a basic interface definition:

    export interface Lot {
    LOT_ID: Number
    LOT_LOC_ID: Number
    LOT_TITLE: String
    LOT_DATE_INSERTED: Date
    }


    I can display this in a table like so:

    <tbody>
    <tr *ngFor="let lot_rec of lot_recs">
    <td>
    {{ lot_rec.LOT_ID }}
    </td>
    <td>
    {{ lot_rec.LOT_TITLE }}
    </td>
    <td>
    {{ lot_rec.LOT_LOC_ID }}
    </td>
    <td>
    {{ lot_rec.LOT_DATE_INSERTED }}
    </td>
    </tr>
    </tbody>


    However, I would like to show LOC_TITLE from the LOC table. Obviously I can join LOT to LOC on LOT_LOC_ID = LOC_ID but do I add LOC_TITLE to the interface for LOT?

    Sorry, I'm brand new to Angular.

    Continue reading...

Compartilhe esta Página