Interface: ModuleViewModel

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

QuickNav


PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

ModuleViewModel

Version:
  • 7.1.0
Since:
  • 7.0.0
Module:
  • ojmodule-element

Module usage

See JET Module Loading for an overview of module usage within JET.

Typescript Import Format
//To use this interface, import as below.
import {ModuleViewModel} from "ojs/ojmodule-element";

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.

A duck-typing interface that defines a contract for a view model consumed by the oj-module element.

Methods

connected(): null

This optional method may be implemented on the ViewModel and will be invoked after the View is inserted into the DOM. This method might be called multiple times - after the View is created and inserted into the DOM, after the View is reconnected after being disconnected and after a parent element, oj-module, with attached View is reconnected to the DOM.
Since:
  • 7.0.0

disconnected(): null

This optional method may be implemented on the ViewModel and will be invoked when the View is disconnected from the DOM. This method might be called multiple times - after the View is disconnected from the DOM and after a parent element, oj-module, with attached View is disconnected from the DOM.
Since:
  • 7.0.0

transitionCompleted(): null

This optional method may be implemented on the ViewModel and invoked after transition to the new View is complete, including any possible animation between the old and the new View.
Since:
  • 7.0.0