Namespace: $scope

Angular.DemographicsController# $scope

The DemographicsController's $scope object. All properties on $scope are available to the view.

Source:

Members

nationalities :Array.<string>

An array of nationalities.

Every nationality in this array is also included in the missing keys file. To make additional nationalities available, add them both here and there.

Type:
  • Array.<string>
Source:

years :Array.<number>

An array of years.

By default, this is a list of every year from one hundred years before the current year up to and including the current year.

Type:
  • Array.<number>
Source:

Methods

genderChanged(gender) → {undefined}

Save gender selection to the TrialData service.

The value of gender is converted to TrialData.data.answers.sex.

Parameters:
Name Type Description
gender string

The new gender

Source:
Returns:
Type
undefined

nationalityChanged(nationality) → {undefined}

Save nationality selection to the TrialData service.

The value of nationality is converted to lower case and saved in TrialData.data.answers.nationality.

Parameters:
Name Type Description
nationality string

The new nationality

Source:
Returns:
Type
undefined

yearChanged(year) → {undefined}

Save year selection to the TrialData service.

The value of year is converted to TrialData.data.answers.dob.

Parameters:
Name Type Description
year string

The new year

Source:
Returns:
Type
undefined