Skip to content

Alloy

Top-level module for Alloy functions.

Properties #

CFG#

Type: Object

An object that stores Alloy configuration values as defined in your app's
app/config.json file.

Collections#

Type: Object

An object for storing globally accessible Alloy collections.

Globals#

Type: Object

An object for storing globally accessible variables and functions.

isHandheld#

Type: Boolean

true if the current device is a handheld device (not a tablet).

isTablet#

Type: Boolean

true if the current device is a tablet.

Models#

Type: Object

An object for storing globally accessible Alloy models.

Methods #

createCollection #

Factory method for instantiating a Backbone collection of model objects.

Parameters:
NameTypeSummaryOptional
nameStringNo
argsObjectYes

Returns: Backbone.Collection — Backbone collection object.

createController #

Factory method for instantiating a controller.

Parameters:
NameTypeSummaryOptional
nameStringNo
argsObjectYes

Returns: Object — Alloy controller object.

createModel #

Factory method for instantiating a Backbone Model object.

Parameters:
NameTypeSummaryOptional
nameStringNo
argsObjectYes

Returns: Backbone.Model — Backbone model object.

createWidget #

Factory method for instantiating a widget controller.

Parameters:
NameTypeSummaryOptional
idStringNo
nameStringYes
argsObjectYes

Returns: Object — Alloy widget controller object.

Titanium SDK Documentation