[Forms] Add clarifying comments

Add in-line documentation to directives and
controller used for the Forms component. WTD-530.
This commit is contained in:
Victor Woeltjen
2014-11-28 14:36:00 -08:00
parent 7f59175313
commit a04b30a383
3 changed files with 50 additions and 1 deletions

View File

@ -6,8 +6,17 @@ define(
var DATE_FORMAT = "YYYY-DDD";
/**
* Controller for the `datetime` form control.
* This is a composite control; it includes multiple
* input fields but outputs a single timestamp (in
* milliseconds since start of 1970) to the ngModel.
*
* @constructor
*/
function DateTimeController($scope) {
// Update the
function update() {
var date = $scope.datetime.date,
hour = $scope.datetime.hour,
@ -23,6 +32,7 @@ define(
}
}
// Update value whenever any field changes.
$scope.$watch("datetime.date", update);
$scope.$watch("datetime.hour", update);
$scope.$watch("datetime.min", update);