This repository has been archived by the owner on Jul 26, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
UIApplication
Adarsh Pastakia edited this page Mar 27, 2017
·
3 revisions
import {UIApplication} from 'aurelia-ui-framework';
@autoinject()
export class Example {
constructor(public app:UIApplication) { ... }
}
-
constants:UIConstants
<!-- my-view.html --> <h1>${app.constants.Title}</h1>
-
Authenticated
-
AuthUser
: Used for sending authorization header on fetch calls -
AuthToken
: Used for sending authorization header on fetch calls
-
login({ username, token }, initialRoute?)
-
logout()
-
navigateTo(routeName, params = {}, options?)
-
routeActive(route)
-
toast(message | toastConfig, container?)
-
toastError(message, container?)
-
toastSuccess(message, container?)
ToastConfig {
title,
message,
glyph,
timeout,
theme: Dark | Primary | Secondary | Info | Danger | Success | Warning
}
alert(message | AlertConfig):Promise<Boolean>
confirm(message | AlertConfig):Promise<Boolean>
prompt(message | AlertConfig):Promise<String>
AlertConfig {
title,
message,
glyph,
okLabel,
// Confirm and Prompt only
cancelLabel,
// Prompt Only
type: 'single' | 'multiline'
}
-
Sharing data across routes
shared(key, value?)
session(key, value?)
persist(key, value?)
Passing no value will delete the key item, shared(this application instance only), session(sessionStorage), persist(localStorage)
-
Logging
info(tag, message, ...)
warn(tag, message, ...)
debug(tag, message, ...)
error(tag, message, ...)
- UIButton
- UIFieldset
- UIForm
- UIInputGroup
- UIInput
- UITextarea
- UIDate
- UIPhone
- UICheckbox
- UIRadio
- UISwitch
- UICombo
- UITag
- UIList
- UIReorder
- UILanguage
- UIMarkdown
- UIDrawer
- UIDropdown
- UIMenu
- UIPanel
- UISidebar
- UIStatsbar
- UIToolbar
- UIDialog
- UITab
- UITree
- UIDatagrid