Skip to content

Commit 32d7b94

Browse files
fix(forms): export collection of form directives as const in Dart
Fixes #1283
1 parent cf32213 commit 32d7b94

4 files changed

Lines changed: 22 additions & 13 deletions

File tree

modules/angular2/forms.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
export * from './src/forms/model';
1414
export * from './src/forms/directives';
15+
export * from './src/forms/directives_all';
1516
export * from './src/forms/validators';
1617
export * from './src/forms/validator_directives';
1718
export * from './src/forms/form_builder';

modules/angular2/src/forms/directives.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,3 @@ export class ControlGroupDirective {
262262
}
263263
}
264264
}
265-
266-
/**
267-
*
268-
* A list of all the form directives used as part of a `@View` annotation.
269-
*
270-
* This is a shorthand for importing them each individually.
271-
*
272-
* @exportedAs angular2/forms
273-
*/
274-
// todo(misko): rename to lover case as it is not a Type but a var.
275-
export var FormDirectives = [
276-
ControlGroupDirective, ControlDirective, CheckboxControlValueAccessor, DefaultValueAccessor
277-
];
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import 'directives.dart';
2+
3+
const FormDirectives = const [
4+
ControlGroupDirective, ControlDirective, CheckboxControlValueAccessor, DefaultValueAccessor
5+
];
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import {ControlGroupDirective, ControlDirective, CheckboxControlValueAccessor, DefaultValueAccessor} from './directives';
2+
3+
4+
/**
5+
*
6+
* A list of all the form directives used as part of a `@View` annotation.
7+
*
8+
* This is a shorthand for importing them each individually.
9+
*
10+
* @exportedAs angular2/forms
11+
*/
12+
// todo(misko): rename to lover case as it is not a Type but a var.
13+
14+
export var FormDirectives = [
15+
ControlGroupDirective, ControlDirective, CheckboxControlValueAccessor, DefaultValueAccessor
16+
];

0 commit comments

Comments
 (0)