Application

The root object that boots the app and owns the dependency injection container.

Since Ember 4/5 (Octane) Spec ↗

Syntax

class App extends Application {}

Returns

Application — The application instance.

Examples

import Application from '@ember/application';
import Resolver from 'ember-resolver';
import loadInitializers from 'ember-load-initializers';
import config from 'my-app/config/environment';

export default class App extends Application {
  modulePrefix = config.modulePrefix;
  podModulePrefix = config.podModulePrefix;
  Resolver = Resolver;
}

loadInitializers(App, config.modulePrefix);

Notes

Defined in app/app.js, the Application sets the module prefix and resolver, then boots the router and registers framework objects in the container. Per-test or per-tab instances are ApplicationInstances.