OrganizationState作為createSelector的第二個參數,即projector,箭頭函數的輸入參數。
左邊的大寫字元串是常量:
b2bUser是在Management資料類型的基礎上,增添了三個新字段:
approvers
permissions
userGroups
B2BUser的五個字段:
Management:
1
export interface B2BUserManagement extends Management
export interface Management extends StateUtils.EntityListState {}
StateUtils.EntityListState
export interface EntityListState {
list: EntityLoaderState;
entities: EntityLoaderState;
}
entities: EntityState;
entities: EntityState
error?: boolean;
success?: boolean;
value?: B2BUser;>;
entities: id1:
id2:
value?: B2BUser;>;…
list: EntityLoaderState
pagination?: PaginationModel;
sorts?: SortModel[];>;
一個運作時例子:
注意:雙層entities字段。id指向value.