mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 13:18:15 +00:00
[Forms] Add clarifying comments
Add in-line documentation to directives and controller used for the Forms component. WTD-530.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user