Extends
- EventDispatcher
Constructor
new View(_id, _route, _navevent, _navparams, _parentViewStackId)
View consider as single UI screen.
View contains Contents consist of "Containers" and "Components".
View can be use with Core HTML Components also.
View manages View Template or DOM Content such behaviour, event listners etc.
View created and manage by ViewNavigator.
Parameters:
Name | Type | Description |
---|---|---|
_id |
String | View Id |
_route |
String | View Route |
_navevent |
String | View Navigation Event Name |
_navparams |
String | Parameters pass to View |
_parentViewStackId |
String | Parent Viewstack Id |
- Source:
Methods
Name | Description |
---|---|
activateView | View Lifecycle Method Call by ViewNavigator attached View visible |
addToViewElement | Add Content DOM ELement to View DOM Element |
addViewHandler | Add Event Handlers for view Internal Components |
attachView | View Lifecycle Method, Call by ViewNavigator, attachView Responsible to render view content, listners etc, Dispatch "ATTACHED_EVENT" when view got attached / rendered, Following methods call by attachView : createViewContent addViewHandler bindView |
bindView | Bind View Component Properties with Model or other view Components |
createViewContent | Create View Contents and Internal Components |
deActivateView | View Lifecycle Method Call by ViewNavigator attached View if visible (active) then will become nonvisible |
destroy | Destroy Method used to cleanup view resources Call by ViewNavigator to destroy view Remove Event Handlers, Make Properties null, Remove View Components and its reference. |
detachView | View Lifecycle Method Call by ViewNavigator View will be remove if View is attached |
dispatchNavBackEvent | |
getViewElement | Returns View DOM Element |
initView | Call by View Constructor |
refreshView | RefreshView method reset View properties or data |
removeViewHandler | Remove Event Handlers for view Internal Components |
unBindView | Remove Bind View Component Properties with Model or other view Components |
activateView()
View Lifecycle Method
Call by ViewNavigator
attached View visible
- Source:
addToViewElement(_tmpViewContentEl)
Add Content DOM ELement to View DOM Element
Parameters:
Name | Type | Description |
---|---|---|
_tmpViewContentEl |
string | Content DOM Element |
- Source:
addViewHandler()
Add Event Handlers for view Internal Components
- Source:
attachView(_parentEl)
View Lifecycle Method,
Call by ViewNavigator,
attachView Responsible to render view content, listners etc,
Dispatch "ATTACHED_EVENT" when view got attached / rendered,
Following methods call by attachView :
createViewContent
addViewHandler
bindView
Parameters:
Name | Type | Default | Description |
---|---|---|---|
_parentEl |
String | null |
- Source:
bindView()
Bind View Component Properties with Model or other view Components
- Source:
createViewContent()
Create View Contents and Internal Components
- Source:
deActivateView()
View Lifecycle Method
Call by ViewNavigator
attached View if visible (active) then will become nonvisible
- Source:
destroy()
Destroy Method used to cleanup view resources
Call by ViewNavigator to destroy view
Remove Event Handlers, Make Properties null,
Remove View Components and its reference.
- Source:
detachView()
View Lifecycle Method
Call by ViewNavigator
View will be remove if View is attached
- Source:
dispatchNavBackEvent(event)
Parameters:
Name | Type | Description |
---|---|---|
event |
Event | Back Navigation Event dispatch by view component or method |
- Source:
getViewElement() → {string}
Returns View DOM Element
- Source:
Returns:
- Type
- string
initView()
Call by View Constructor
- Source:
refreshView()
RefreshView method reset View properties or data
- Source:
removeViewHandler()
Remove Event Handlers for view Internal Components
- Source:
unBindView()
Remove Bind View Component Properties with Model or other view Components
- Source: