lib/features/src/questions/questionnaire/questionnaire.service.ts
Properties |
|
Methods |
|
constructor(stores: QuestionStore[], metaActions: MetaAction<QuestionConfig, Question, QuestionStore>[])
|
|||||||||
Parameters :
|
Public handleIdWithoutItem | ||||||
handleIdWithoutItem(id: string)
|
||||||
Inherited from
MetaStore
|
||||||
Defined in
MetaStore:40
|
||||||
Parameters :
Returns :
Question | null
|
Async filter | ||||||
filter(callback: (item: I,index: number,arr: I[]) => void)
|
||||||
Inherited from
MetaStore
|
||||||
Defined in
MetaStore:103
|
||||||
Parameters :
Returns :
Promise<I[]>
|
Public Async get | ||||||
get(id: string)
|
||||||
Inherited from
MetaStore
|
||||||
Defined in
MetaStore:73
|
||||||
Parameters :
Returns :
Promise<I | null>
|
Public getStore | ||||||
getStore(item: I)
|
||||||
Inherited from
MetaStore
|
||||||
Defined in
MetaStore:98
|
||||||
Parameters :
Returns :
S | null
|
Public name |
Type : string
|
Default value : "QUESTIONNAIRE.NAME"
|
Inherited from
MetaStore
|
Defined in
MetaStore:27
|
Public change$ |
Type : Observable<I>
|
Inherited from
MetaStore
|
Defined in
MetaStore:29
|
Public metaActions |
Type : MetaAction<C, I, S>[]
|
Default value : []
|
Inherited from
MetaStore
|
Defined in
MetaStore:34
|
Public stores |
Type : S[]
|
Default value : []
|
Inherited from
MetaStore
|
Defined in
MetaStore:33
|
import {
Injectable,
Inject,
Optional
} from '@angular/core'
import { Question,
QuestionConfig,
QuestionStore,
} from '@rcc/core'
import {
MetaStore,
MetaAction
} from '@rcc/common'
import {
QUESTION_STORES,
QUESTION_META_ACTIONS
} from './questionnaire.commons'
@Injectable()
export class Questionnaire extends MetaStore<QuestionConfig, Question, QuestionStore> {
public name = "QUESTIONNAIRE.NAME"
constructor(
@Optional() @Inject(QUESTION_STORES)
stores : QuestionStore[],
@Optional() @Inject(QUESTION_META_ACTIONS)
metaActions : MetaAction<QuestionConfig, Question, QuestionStore>[]
) {
super(stores, metaActions)
}
public handleIdWithoutItem(id: string): Question | null {
return new Question(id)
}
}