next-core-application

2.5.5 • Public • Published

next-core-application

Augmented.js Next Core - Application

API

Table of Contents

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

Parameters

  • options object options to init the application

Examples

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();

router

The router property of the application

started

The started property of the application

Returns boolean Returns the property of the started Event

initialize

Event for after during startup of the application

beforeInitialize

Event for before the startup of the application

afterInitialize

Event for after the startup of the application

name

The application name

metadata

The metadata map

Returns any Map of metadata in an Augmented.Utility.Map

setMetadataItem

Set a specific item in metadata

Parameters

getMetadataItem

Get a specific item in metadata

Parameters

Returns object value of the key

registerRouter

Register a Router - adds routes to the application

Parameters

  • router Router Router to register

start

Event to start the application and history

Returns Promise Promise.Resolve or Promise.Reject based on success

stop

Event to stop the application and history

datastore

Gets the datastore for the application

Properties

  • datastore (Augmented.Model | object)

Package Sidebar

Install

npm i next-core-application

Weekly Downloads

1

Version

2.5.5

License

Apache-2.0

Unpacked Size

806 kB

Total Files

39

Last publish

Collaborators

  • thedocbwarren