import { DaffInMemoryBackendCategoryService } from '@daffodil/category/driver/in-memory'
An in-memory service that mocks out the backend services for getting categories. See the angular in memory documentation for more details.
@Injectable()
class DaffInMemoryBackendCategoryService implements InMemoryDbService, DaffInMemorySingleRouteableBackend {
readonly collectionName: "category" = DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME
protected _root: DaffCategory
protected _categories: DaffCategory[] = []
protected _categoryPageMetadata: DaffCategoryPageMetadata
get rootCategory(): DaffCategory
get categories(): DaffCategory[]
get categoryPageMetadata(): DaffCategoryPageMetadata
get(reqInfo: any): any
protected getTotalPages(
allIds: string[]
pageSize: number
): number
protected trimProductIdsToSinglePage(
allIds: any[]
currentPage: number
pageSize: number
): any[]
protected generatePageSize(reqInfo): number
protected getCurrentPageParam(reqInfo): number
}
"category"
Default | DAFF_CATEGORY_IN_MEMORY_COLLECTION_NAME |
---|---|
Description |
DaffCategory
Default | – |
---|---|
Description |
DaffCategory[]
Default | [] |
---|---|
Description |
DaffCategoryPageMetadata
Default | – |
---|---|
Description |
DaffCategory
Default | – |
---|---|
Description |
DaffCategory[]
Default | – |
---|---|
Description | The collection of categories in the backend. |
DaffCategoryPageMetadata
Default | – |
---|---|
Description | The metadata associated with the current page. |
any
Get a category.
Parameter | reqInfo: any |
---|---|
Description |
number
Parameter | allIds: string[] |
---|---|
Description |
Parameter | pageSize: number |
---|---|
Description |
any[]
Parameter | allIds: any[] |
---|---|
Description |
Parameter | currentPage: number |
---|---|
Description |
Parameter | pageSize: number |
---|---|
Description |
number
Parameter | reqInfo: undefined |
---|---|
Description |
number
Parameter | reqInfo: undefined |
---|---|
Description |