The MasterController's $scope object. All properties on
$scope are available to the view.
Members
alerts :Array.<string>
Array for holding alert messages.
Type:
- Array.<string>
blackoutClass :boolean
A flag indicating whether or not the 'blackout' class should
be added to the body of the visible page. When this is
true, the page is blacked out.
Type:
- boolean
debugMode :boolean
Indicates whether or not debugging mode is enabled.
Type:
- boolean
Methods
addAlert(alert) → {undefined}
Adds an alert to $scope#alerts, unless it is already present.
Parameters:
| Name | Type | Description |
|---|---|---|
alert |
Object | This object should have two properties:
|
Returns:
- Type
- undefined
addGenericErrorAlert() → {undefined}
Adds a generic error alert to $scope#alerts. The
alert is a 'danger'-type alert, and in the demo app
displays the message 'There seems to be a problem. Please
contact a mediator for assistance.'
Returns:
- Type
- undefined
advanceSlide() → {undefined}
Resets the inactivity timeout, advance the slide by calling ExperimentManager#advanceSlide., and clear all current alerts.
Returns:
- Type
- undefined
closeAlert(index) → {undefined}
Closes the alert in $scope#alerts at the specified index.
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | The index in the $scope#alerts array of the alert to close |
Returns:
- Type
- undefined
handleRightArrow() → {undefined}
Calls ExperimentManager#advanceSlide
if Angular.ExperimentManager#$scope#debugMode is true.
Returns:
- Type
- undefined
hideBody() → {undefined}
A convenience method for setting $scope#blackoutClass
to true (and blacking out the page).
Returns:
- Type
- undefined
setLanguage(language) → {undefined}
Set the current language used for displaying content. Ensure that you have translations available and compiled (see the README).
Parameters:
| Name | Type | Description |
|---|---|---|
language |
string | The language code of the language to use |
Returns:
- Type
- undefined
showBody() → {undefined}
A convenience method for setting $scope#blackoutClass
to false (and reversing the blacking out of the page).
Returns:
- Type
- undefined
startOver() → {undefined}
Return to the 'home' state.
Returns:
- Type
- undefined
toggleBodyVisibility() → {undefined}
A convenience method for toggling the value of $scope#blackoutClass.
Returns:
- Type
- undefined
toggleDebugMode() → {undefined}
Toggles debugging mode. If debugging mode is enabled, an alert is posted to the view.
Returns:
- Type
- undefined
trialDataJson() → {Object}
Expose TrialData#toJson on
$scope. Calling this method returns the result of calling
TrialData#toJson.
Returns:
- Type
- Object