load
[ Function ]
public static load(
url: string,
callback: null | (
(data: TcHmi.IResultObject) => void
) = null
): void;
Loads a *.view file based on a relative path in the project directory.
Parameter
Name | Type | Description |
---|---|---|
url | The relative path to a *.view file from the root directory of the application. | |
callback [ optional ] | null, ((data: TcHmi.IResultObject) => void) | Callback function, which is called after loading the view or in the event of an error. |
Return value
Type | Description |
---|---|
void | No return value |
Available from 1.8 |
Sample - JavaScript
var v1 = TcHmi.View.get();
TcHmi.Log.debug(v1.getId());
TcHmi.View.load('View2.view', function (data) {
var v2 = TcHmi.View.get();
TcHmi.Log.debug(v2.getId());
});