Augmented.js Next Core - Application
Application Class for use to define an application.
An application contains metadata and initializers for the application.
Applications track history, and normally would contain the entire single page App startup.
Supported options are:
- metadata - an object of metadata to use for storing properties
- name - the name of the application
- datastore - a datastore to use via the datastore property
- router - the router to use via the router property
-
options
object options to init the application
const app = new Application({ "name": "Awesome" });
app.start();
const app = new Application();
app.name = "My Super Application!";
app.setMetadataItem("description", "something very awesome");
app.initialize = () => { do some stuff... };
app.start();
The router property of the application
The started property of the application
Returns boolean Returns the property of the started Event
Event for after during startup of the application
Event for before the startup of the application
Event for after the startup of the application
The application name
The metadata map
Returns any Map of metadata in an Augmented.Utility.Map
Set a specific item in metadata
Get a specific item in metadata
-
key
string Key
Returns object value of the key
Register a Router - adds routes to the application
-
router
Router Router to register
Event to start the application and history
Returns Promise Promise.Resolve or Promise.Reject based on success
Event to stop the application and history
Gets the datastore for the application
-
datastore
(Augmented.Model | object)