src/components/kendoUI/kendocomponent/kendocomponent.component.ts
OnDestroy
DoCheck
AfterViewInit
Properties |
Methods |
|
Accessors |
constructor(differs: KeyValueDiffers, elementRef: ElementRef, widgetName: string)
|
||||||||||||
Parameters :
|
boundValue |
Type : any
|
Private differences |
Type : any
|
element |
Type : any
|
Component properties element: Has the native element reference. kWidget: k-widget reference. widget: Widget reference. boundValue: It controls the bound value for the current component. modelValue: It controls the model value for the current component. prefix: Is used to set a prefix for a function of the current component. isViewInitialized: Boolean view value for the current component. eventQueue: This property contains an array of all the events registered to this component. differences: Is used to check if the model changes. |
eventQueue |
Type : any[]
|
Default value : []
|
isViewInitialized |
Default value : false
|
kWidget |
Type : any
|
modelValue |
Type : any
|
prefix |
Type : string
|
Default value : 'applyRefresh'
|
widget |
Type : any
|
Protected applyChanges | ||||||||
applyChanges(changes: any)
|
||||||||
This method apply changes when any of the following actions in the model is triggered: forEachRemovedItem: Something has been removed. forEachAddedItem: Something has been added. forEachChangedItem: Something has been changed.
Parameters :
Returns :
void
|
ngAfterViewInit |
ngAfterViewInit()
|
This is part of Angular lifecycle hook. By definition this is Called once after the first ngAfterContentChecked(). Our ngAfterViewInit is the one incharge to process the eventQueue array whe the view is initialized.
Returns :
void
|
ngDoCheck |
ngDoCheck()
|
This is part of Angular lifecycle hook. By definition this is the one who detect and act upon changes that Angular can not or will not detect on its own. ngDoCheck notifies when model changes and send to applyChanges() method the changes.
Returns :
void
|
ngOnDestroy |
ngOnDestroy()
|
This is part of Angular lifecycle hook. By definition this is the one who destroys a component. ngOnDestroy gets the native element reference and destroy its widget.
Returns :
void
|
registerFunction | ||||||||||||
registerFunction(property: string, fn: (val: any) => void)
|
||||||||||||
This function is a merge between a component property and a function, you have to use registerFunction when you need to execute a function after some property change this string must has the first letter as a capital letter in order to follow the model's properties structure.
Parameters :
Returns :
void
|
render |
render()
|
Render method is the one in charge to set a refecence of k-widget and widget.
Returns :
void
|
Protected updateComponent | ||||||||||||
updateComponent(key: string, value: any)
|
||||||||||||
This function builds a registered function and push it to eventQueue array.
Parameters :
Returns :
void
|
bound | ||||||||
getbound()
|
||||||||
Return boundValue.
Returns :
any
|
||||||||
setbound(value: any)
|
||||||||
Parameters :
Returns :
void
|
model | ||||||||
setmodel(value: any)
|
||||||||
This sets a new model if the model changes
Parameters :
Returns :
void
|