app

In HTML, we know window as global environment object. On the other side, FIWL uses app to give access for your app environment.

Constants#

NameTypeDescription
colorsobjectProvides nice and easy color palette. Courtesy Google Material Design.
netobjectNetworking utility to communicate with server.
manifestobjectAccess to app's manifest.
resobjectAccess to current stage's resources including style.
displayobjectProvides app's viewport information including resolution, scaling, and orientation.
unitobjectUnit conversion utility to help us convert unit (as example dp to px) easily.
eventobjectAccess to event listener registration.
widgetsobjectContains classes of widgets that linked to FIWL parser.
stageobjectAllows modification for currently running stage.

Methods#

NameReturn TypeDescription
gotoPromise<void>Call this if you need to navigate to another stage.

goto#

app.goto(route);

Call this if you need to navigate to another stage.

Parameters:

  1. goto: (string type) URL of intended stage, relative to your website URL.

Return: Promise<void>. Use .then(() => { your code here }) to run something after stage swapped.