Last active
June 8, 2018 16:47
-
-
Save perjerz/224e7ecc4043048e93875dc080115f45 to your computer and use it in GitHub Desktop.
NgRx State
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface Item { | |
id: string; | |
name: string; | |
type: string; | |
price: string; | |
description: string; | |
} | |
export interface Cart { | |
// Define state here | |
// สินค้าทั้งหมดที่ได้รับจาก API เพื่อโชว์ให้ Users เลือก | |
displayItems: Item[], | |
// คู่ไอดีกับจำนวนสินค้าแต่ละชนิดที่ User มีอยู่ในรถเข็น (Cart) | |
selectedItems: { [id: string]: number }; | |
} | |
export interface CartState { | |
readonly cart: Cart; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment