Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit ede5307

Browse files
korsvanloonrkirov
authored andcommitted
refactor(ngControl, ngModel) : add type annotations
Added type annotations on public fields for ng_control and ng_model as described in issue #853. All other public fields in the other directives followed these rules, but the public fields here adjusted didn't.
1 parent 15452ab commit ede5307

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

lib/directive/ng_control.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ part of angular.directive;
88
* user input with NgModel.
99
*/
1010
abstract class NgControl implements AttachAware, DetachAware {
11-
static const NG_INVALID = "ng-invalid";
12-
static const NG_PRISTINE = "ng-pristine";
13-
static const NG_DIRTY = "ng-dirty";
14-
static const NG_TOUCHED = "ng-touched";
15-
static const NG_UNTOUCHED = "ng-untouched";
16-
static const NG_SUBMIT_VALID = "ng-submit-valid";
17-
static const NG_SUBMIT_INVALID = "ng-submit-invalid";
11+
static const String NG_INVALID = "ng-invalid";
12+
static const String NG_PRISTINE = "ng-pristine";
13+
static const String NG_DIRTY = "ng-dirty";
14+
static const String NG_TOUCHED = "ng-touched";
15+
static const String NG_UNTOUCHED = "ng-untouched";
16+
static const String NG_SUBMIT_VALID = "ng-submit-valid";
17+
static const String NG_SUBMIT_INVALID = "ng-submit-invalid";
1818

1919
String _name;
2020
bool _submitValid;
@@ -30,13 +30,13 @@ abstract class NgControl implements AttachAware, DetachAware {
3030
* The list of errors present on the control represented by an error name and
3131
* an inner control instance.
3232
*/
33-
final errorStates = new Map<String, Set<NgControl>>();
33+
final Map<String, Set<NgControl>> errorStates = new Map<String, Set<NgControl>>();
3434

3535
/**
3636
* The list of info messages present on the control represented by an state name and
3737
* an inner control instance.
3838
*/
39-
final infoStates = new Map<String, Set<NgControl>>();
39+
final Map<String, Set<NgControl>> infoStates = new Map<String, Set<NgControl>>();
4040

4141
NgControl(NgElement this._element, DirectiveInjector injector,
4242
Animate this._animate)

lib/directive/ng_model.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -482,11 +482,11 @@ class InputNumberLike {
482482
@Decorator(selector: 'input[type=month][ng-model][ng-bind-type]', visibility: Visibility.LOCAL)
483483
@Decorator(selector: 'input[type=week][ng-model][ng-bind-type]', visibility: Visibility.LOCAL)
484484
class NgBindTypeForDateLike {
485-
static const DATE = 'date';
486-
static const NUMBER = 'number';
487-
static const STRING = 'string';
488-
static const DEFAULT = DATE;
489-
static const VALID_VALUES = const <String>[DATE, NUMBER, STRING];
485+
static const String DATE = 'date';
486+
static const String NUMBER = 'number';
487+
static const String STRING = 'string';
488+
static const String DEFAULT = DATE;
489+
static const List<String> VALID_VALUES = const <String>[DATE, NUMBER, STRING];
490490

491491
final dom.InputElement inputElement;
492492
String _idlAttrKind = DEFAULT;

0 commit comments

Comments
 (0)