Skip to end of metadata
Go to start of metadata

Titanium Angular comes with a set of helpers that provide a modernized access to commonly used features of our Titanium SDK. All of these employ a Promise-based API and try to abstract away repetitive steps from the original Titanium APIs. However, they are purely a convenience feature and won't replace any existing Titanium APIs.

User Interface

Dialogs

To ease the creation of dialogs, Titanium Angular comes with several predefined dialogs.

AlertDialog

The AlertDialog helper allows you to display a simple alert with a single button. Besides the dialog's title and message you can also specify an optional okButtonText.

AlertDialog

ConfirmDialog

A confirm dialog will display a dialog using the title and message properties. You can also change the button text through the okButtonText and cancelButtonText options.

ConfirmDialog

Prompt Dialog

To prompt a user for some text input you can use the prompt dialog.

Icon

This has not yet been impletement with the current tech preview.

Custom Dialogs

Besides those predefined dialogs you can also completely customize your dialogs using the BaseDialog class. A base dialog accepts the title and message options. You can then add multiple DialogAction to your dialog which represent a button of the dialog with a title and an optional handler function to call if that button is pressed.

BaseDialog

By default both the cancel and destructive properties are set to false.

Picker (Android only)

Handle the common use case of date and time pickers presented as modals with the following helper classes.

Time Picker

A simple time picker can be created with a minDate, maxValue, and value options. All of those options are optional and will accept a Date object. Passing an empty options object results in no restrictions on the selectable time frame and the current time will be pre-selected.

TimePicker

Date Picker

Selecting both the date and a time can be achieved with the date picker. It accepts the minDatemaxValue and value options. All of those options are optional and will accept a Date object. Passing an empty options object results in no restrictions on the selectable dates and the current date and time will be pre-selected.

DatePicker

Device

Device environment

Allows to check on which platform the app is currently running.

Valid platform names are android, ios, and windows.

  • No labels