projects/aoc-client/components/aoc-form/aoc-form-controller.ts
Properties |
|
Methods |
|
Accessors |
_formGroup |
Type : FormGroup
|
Readonly deleting$ |
Default value : this.#deleting$.asObservable()
|
Deleting status observable. True when form is deleting, false otherwise. |
Readonly saving$ |
Default value : this.#saving$.asObservable()
|
Saving status observable. True when form is saving, false otherwise. |
addAfterDeleteAction | ||||||
addAfterDeleteAction(action: AocFormControllerEventAction
|
||||||
Adds an action after saving the model. The action can be async and return a string error which will be shown.
Parameters :
Returns :
void
|
addAfterSaveAction | ||||||
addAfterSaveAction(action: AocFormControllerEventAction
|
||||||
Adds an action after saving the model. The action can be async and return a string error which will be shown.
Parameters :
Returns :
void
|
addBeforeDeleteAction | ||||||
addBeforeDeleteAction(action: AocFormControllerEventAction
|
||||||
Adds an action before saving the model. The action can be async and return a string error which will cancel the save action
Parameters :
Returns :
void
|
addBeforeSaveAction | ||||||
addBeforeSaveAction(action: AocFormControllerEventAction
|
||||||
Adds an action before saving the model. The action can be async and return a string error which will cancel the save action
Parameters :
Returns :
void
|
addDeleteErrorAction | ||||||
addDeleteErrorAction(action: AocFormControllerEventAction
|
||||||
Adds an action when a save error occurs
Parameters :
Returns :
void
|
addSaveErrorAction | ||||||
addSaveErrorAction(action: AocFormControllerEventAction
|
||||||
Adds an action when a save error occurs
Parameters :
Returns :
void
|
autopatch |
autopatch()
|
Returns :
boolean
|
Public complete |
complete()
|
Send a complete signal to all internal observables.
Returns :
void
|
Static custom | ||||||
custom(config: literal type)
|
||||||
Parameters :
Returns :
Provider
|
Async delete |
delete()
|
Fires the delete method in the aco-form
Returns :
any
|
Async getActionResults | ||||||||
getActionResults(event: AocFormControllerEvent<any>)
|
||||||||
Method to handle actions errors
Parameters :
Returns :
Promise<string[]>
an array of errors as strings |
getFormGroup |
getFormGroup()
|
Returns :
FormGroup<{ [K in keyof T]: AbstractControl<T[K]>; }>
|
isPatched |
isPatched()
|
Returns :
boolean
|
Async model |
model()
|
Returns :
Promise<T>
|
Async patched |
patched()
|
Returns :
Promise<T>
|
Async patchModel |
patchModel()
|
Returns :
any
|
registerPatchAsyncHandler | ||||||
registerPatchAsyncHandler(handler: Promise
|
||||||
Parameters :
Returns :
void
|
Async save |
save()
|
Fires the save method in the aco-form and returns the saved model when complete.
Returns :
Promise<T>
|
setDeleteFn | ||||||
setDeleteFn(deleteFn: () => void)
|
||||||
Sets the delete function. Used by aoc-form, binds its delete function to this method
Parameters :
Returns :
void
|
setFormGroup | ||||||
setFormGroup(formGroup: FormGroup)
|
||||||
Parameters :
Returns :
void
|
setModel | ||||||
setModel(model: T)
|
||||||
Parameters :
Returns :
void
|
setSaveFn | ||||||
setSaveFn(saveFn: () => void)
|
||||||
Sets the save function. Used by aoc-form, binds its save function to this method
Parameters :
Returns :
void
|
saving | ||||
getsaving()
|
||||
True when form is saving the model, false otherwise. |
||||
setsaving(_saving)
|
||||
Sets the saving status
Parameters :
Returns :
void
|
deleting | ||||
getdeleting()
|
||||
True when form is deleting the model, false otherwise. |
||||
setdeleting(_deleting)
|
||||
Sets the deleting status
Parameters :
Returns :
void
|