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.
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 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) : {void}
-
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 Returns:
- Type
- void
-
bindingsApplied(info) : {void}
-
Invoked after the bidnings for the new View are applied. If the current View is retrieved from cache, the bindings will not be re-applied, and this callback will not be invoked.
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 Returns:
- Type
- void
-
deactivated(info) : {void}
-
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 Returns:
- Type
- void
-
detached(info) : {void}
-
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) Returns:
- Type
- void
-
transitionCompleted(info) : {void}
-
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 Returns:
- Type
- void