O'Reilly logo

Mastering TypeScript by Nathan Rozentals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Marionette application, regions and layouts

We can now focus our attention on building the application itself. In Marionette, this is achieved by creating a class that derives from Marionette.Application, as follows:

export class BoardSalesApp extends Marionette.Application {
    viewLayout: pvl.PageViewLayout;
    constructor(options?: any) {
        if (!options)
            options = {};
        super();
        this.viewLayout = new pvl.PageViewLayout();
    }
    onStart() {
        this.viewLayout.render();
    }
}

Here, we have defined a class named BoardSalesApp that derives from the Marionette.Application class, and will serve as the starting point for our application. Our constructor function is fairly simple, and creates a new instance of the PageViewLayout class, which we will discuss shortly. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required