Skip to content

Commit 00c3693

Browse files
committed
feat(forms): migrated forms to typescript
1 parent fed86fc commit 00c3693

File tree

12 files changed

+221
-254
lines changed

12 files changed

+221
-254
lines changed

modules/angular2/forms.js renamed to modules/angular2/forms.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
* @module
33
* @public
44
* @description
5-
* This module is used for handling user input, by defining and building a {@link ControlGroup} that consists of
6-
* {@link Control} objects, and mapping them onto the DOM. {@link Control} objects can then be used to read information
5+
* This module is used for handling user input, by defining and building a {@link ControlGroup} that
6+
* consists of
7+
* {@link Control} objects, and mapping them onto the DOM. {@link Control} objects can then be used
8+
* to read information
79
* from the form DOM elements.
810
*
9-
* This module is not included in the `angular2` module; you must import the forms module explicitly.
11+
* This module is not included in the `angular2` module; you must import the forms module
12+
* explicitly.
1013
*
1114
*/
1215

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
library angular2.core.decorators;
22

3+
export '../annotations_impl/annotations.dart';
4+
export '../annotations_impl/visibility.dart';
5+
36
/* This file is empty because, Dart does not have decorators. */

modules/angular2/src/core/annotations/decorators.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import {ComponentAnnotation, DirectiveAnnotation} from './annotations';
22
import {ViewAnnotation} from './view';
3-
import {AncestorAnnotation, ParentAnnotation} from './visibility';
3+
import {
4+
SelfAnnotation,
5+
ParentAnnotation,
6+
AncestorAnnotation,
7+
UnboundedAnnotation
8+
} from './visibility';
49
import {AttributeAnnotation, QueryAnnotation} from './di';
510
import {makeDecorator, makeParamDecorator} from '../../util/decorators';
611

@@ -12,8 +17,10 @@ export var Directive = makeDecorator(DirectiveAnnotation);
1217
export var View = makeDecorator(ViewAnnotation);
1318

1419
/* from visibility */
15-
export var Ancestor = makeParamDecorator(AncestorAnnotation);
20+
export var Self = makeParamDecorator(SelfAnnotation);
1621
export var Parent = makeParamDecorator(ParentAnnotation);
22+
export var Ancestor = makeParamDecorator(AncestorAnnotation);
23+
export var Unbounded = makeParamDecorator(UnboundedAnnotation);
1724

1825
/* from di */
1926
export var Attribute = makeParamDecorator(AttributeAnnotation);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
export {
2+
Self as SelfAnnotation,
23
Ancestor as AncestorAnnotation,
34
Parent as ParentAnnotation,
5+
Unbounded as UnboundedAnnotation
46
} from '../annotations_impl/visibility';

modules/angular2/src/core/compiler/directive_resolver.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export class DirectiveResolver {
1010
if (isPresent(annotations)) {
1111
for (var i = 0; i < annotations.length; i++) {
1212
var annotation = annotations[i];
13-
1413
if (annotation instanceof Directive) {
1514
return annotation;
1615
}

0 commit comments

Comments
 (0)