HtmlApplication

An object that manages views and controls the application life cycle.

Included in: dx.mobile.js, dx.web.js, dx.viz-web.js, dx.all.js
Export: default
Type:

Object

The HtmlApplication object connects markup elements, scripts and styles to a single application, and provides methods for controlling the application life cycle. To create an HtmlApplication object, call the HtmlApplication constructor within the document.ready event handler or the jQuery "$()" function.

JavaScript
$(function () {
    MyApp.app = new DevExpress.framework.html.HtmlApplication();
});

To configure the HtmlApplication object, pass a configuration object as the constructor's parameter. Specify the required options within the configuration object. For instance, specify the set of layouts to be used as a skeleton for application views. Using the application object, register a routing rule for the application and navigate to a starting view.

JavaScript
window.MyApp = {};
$(function() {
    MyApp.app = new DevExpress.framework.html.HtmlApplication({
        namespace: MyApp,
        layoutSet: DevExpress.framework.html.layoutSets['navbar']
    });
    MyApp.app.router.register(":view", { view: "index"});
    MyApp.app.navigate();
});

Configuration

This section describes configuration options used to create an HtmlApplication object.

Fields

This section describes the fields used to access the important parts of the application.

Methods

This section describes the methods used to manipulate the application flow.

Events

This section describes events fired by the HtmlApplication object.