App

App

# new App(optsopt) → {App}

Constructor class for the main framework app.

SUGAR.App contains the core instance of the app. All related modules can be found within the SUGAR namespace.

An uninitialized instance will exist on page load but you will need to call App#init to initialize your instance.

By default, the app uses body element and div#content as root element and content element respectively.

var app = SUGAR.App.init({
    el: '#root',
    contentEl: '#content'
});

If you want to initialize an app without initializing its modules,

var app = SUGAR.App.init({el: '#root', silent: true});
Parameters:
Name Type Attributes Description
opts Object <optional>

Configuration options. See full list of options in #init.

Mixes In:
Source:
Returns:

Application instance.

Type
App