-
Notifications
You must be signed in to change notification settings - Fork 4
Core
Eric edited this page Apr 25, 2018
·
129 revisions
OGX.App is the core of the application. It can hold multi stages, windows, popups and an overlay per stage.
OGX.App requires a configuration file app.config that must exist in the www folder of your project. If you are using the CLI, the file is automatically created when initialiazing the project by doing ogx init. Otherwise, create that file by hand, here is the skeleton
{
"routing":{},
"stages":{},
"templates":{},
"scopes":["public"]
}
let config = {
scopes:_ARRAY_ //List of current permissions the user has - Defaults to ['public']
};
let app = new OGX.App(config);
Add a stage to the app
app.addStage(_STAGE_NAME_, _STAGE_OBJECT, _CONFIG_);
Remove that stage from the app
app.removeStage(_STAGE_NAME_);
Use another stage (to add/remove views for instance)
app.useStage(_STAGE_NAME_);
Snooze a stage (all views, windows of this stage)
app.snoozeStage(_STAGE_NAME_);
Wake a stage (all views, windows of this stage)
app.wakeStage(_STAGE_NAME_);
Show a stage (and hide the current one if any)
app.showStage(_STAGE_NAME_, _ANIMATION_);
Add a view to the stage in use
app.addToStage(_CONFIG_);
Remove a view from the stage in use
app.removeFromStage(_SELECTOR_);
- Welcome
- Changelog
- Structure
- Configuration
- Getting started
- CLI
- Poly
- Core
- Templating
- Routing
- Controllers
- Components
- Extra Components
- Helpers
- Styling
- Debugging