A duck-typing interface that defines methods for the ojModule binding's lifecycle listener.
Use 'lifecycleListener' option on the ojModule binding to set the listener.
- Source:
Methods
-
activated(info) → {Promise|undefined}
-
Invoked when the binding starts loading a new View and ViewModel
Parameters:
Name Type Description infoObject an object with the following key-value pairs: Properties
Name Type Description elementNode DOM element or where the binding is attached. This may be a 'virtual' element (comment node) valueAccessorFunction binding's value accessor - Source:
Returns:
- If the callback returns a Promise, the next phase (attaching DOM) will be delayed until the promise is resolved- Type
- Promise | undefined
-
attached(info)
-
Invoked after the View is inserted into the document DOM
Parameters:
Name Type Description infoObject an object with the following key-value pairs: Properties
Name Type Description elementNode DOM element or where the binding is attached. This may be a 'virtual' element (comment node) valueAccessorFunction binding's value accessor viewModelObject ViewModel for the View being attached fromCacheboolean a boolean indicating the view was retrieved from cache - Source:
-
deactivated(info)
-
Invoked when the View/ViewModel combination becomes inactive
Parameters:
Name Type Description infoObject an object with the following key-value pairs: Properties
Name Type Description elementNode DOM element or where the binding is attached. This may be a 'virtual' element (comment node) valueAccessorFunction binding's value accessor viewModelObject ViewModel for the View being attached - Source:
-
detached(info)
-
Invoked after the View is removed from the document DOM
Parameters:
Name Type Description infoObject an object with the following key-value pairs: Properties
Name Type Description elementNode DOM element or where the binding is attached. This may be a 'virtual' element (comment node) valueAccessorFunction binding's value accessor viewModelObject ViewModel for the View being attached cachedNodesArray an Array containing cached nodes for the View (if the cache is enabled) - Source:
-
transitionCompleted(info)
-
Invoked after transition to the new View is complete. That includes any possible animation between the old and the new View
Parameters:
Name Type Description infoObject an object with the following key-value pairs: Properties
Name Type Description elementNode DOM element or where the binding is attached. This may be a 'virtual' element (comment node) valueAccessorFunction binding's value accessor viewModeObject ViewModel for the new View - Source: