我是 Angular 7 的新手。我試圖用 Angular 7 在 html 端顯示產(chǎn)品的顏色,但我無(wú)法成功。我的桌子如下;產(chǎn)品ID名稱顏色I(xiàn)D名稱產(chǎn)品顏色關(guān)系ID產(chǎn)品編號(hào)顏色標(biāo)識(shí)在 product.component.ts 文件中,聲明了 product 變量public product: Product;在產(chǎn)品屏幕上,我試圖用下面的代碼顯示產(chǎn)品的顏色{{ product.ProductColorRelations[0].Name }}但它不顯示顏色的名稱。我在這里做錯(cuò)了什么?
如何使用 Angular 7 在 html 中顯示相關(guān)數(shù)據(jù)
慕斯王
2021-06-01 08:28:18