diff --git a/modules/angular2/src/forms/directives.js b/modules/angular2/src/forms/directives.js index c40ba45137..429297fae5 100644 --- a/modules/angular2/src/forms/directives.js +++ b/modules/angular2/src/forms/directives.js @@ -97,13 +97,13 @@ export class CheckboxControlValueAccessor { * the control will reflect that change. Likewise, if the value of the control changes, the input element reflects that * change. * - * Here we use {@link FormDirectives}, rather than importing each form directive individually, e.g. + * Here we use {@link formDirectives}, rather than importing each form directive individually, e.g. * `ControlDirective`, `ControlGroupDirective`. This is just a shorthand for the same end result. * * ``` * @Component({selector: "login-comp"}) * @View({ - * directives: [FormDirectives], + * directives: [formDirectives], * inline: "" * }) * class LoginComp { @@ -183,13 +183,13 @@ export class ControlDirective { * In this example, we bind the control group to the form element, and we bind the login and password controls to the * login and password elements. * - * Here we use {@link FormDirectives}, rather than importing each form directive individually, e.g. + * Here we use {@link formDirectives}, rather than importing each form directive individually, e.g. * `ControlDirective`, `ControlGroupDirective`. This is just a shorthand for the same end result. * * ``` * @Component({selector: "login-comp"}) * @View({ - * directives: [FormDirectives], + * directives: [formDirectives], * inline: "
" + * "Login " + * "Password " + @@ -271,7 +271,6 @@ export class ControlGroupDirective { * * @exportedAs angular2/forms */ -// todo(misko): rename to lover case as it is not a Type but a var. -export const FormDirectives:List = CONST_EXPR([ +export const formDirectives:List = CONST_EXPR([ ControlGroupDirective, ControlDirective, CheckboxControlValueAccessor, DefaultValueAccessor ]); diff --git a/modules/angular2/src/forms/form_builder.js b/modules/angular2/src/forms/form_builder.js index 3c745166cc..c3f2363430 100644 --- a/modules/angular2/src/forms/form_builder.js +++ b/modules/angular2/src/forms/form_builder.js @@ -10,8 +10,8 @@ import * as modelModule from './model'; * * ``` * import {Component, View, bootstrap} from 'angular2/angular2'; - * import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms'; - * + * import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms'; + * * @Component({ * selector: 'login-comp', * injectables: [ @@ -22,7 +22,7 @@ import * as modelModule from './model'; * template: ` * * Login - * + * *
* Password * Confirm password @@ -30,16 +30,16 @@ import * as modelModule from './model'; * * `, * directives: [ - * FormDirectives + * formDirectives * ] * }) * class LoginComp { * loginForm: ControlGroup; - * + * * constructor(builder: FormBuilder) { * this.loginForm = builder.group({ * login: ["", Validators.required], - * + * * passwordRetry: builder.group({ * password: ["", Validators.required], * passwordConfirmation: ["", Validators.required] @@ -47,11 +47,11 @@ import * as modelModule from './model'; * }); * } * } - * + * * bootstrap(LoginComp) * ``` - * - * This example creates a {@link ControlGroup} that consists of a `login` {@link Control}, and a nested + * + * This example creates a {@link ControlGroup} that consists of a `login` {@link Control}, and a nested * {@link ControlGroup} that defines a `password` and a `passwordConfirmation` {@link Control}: * * ``` diff --git a/modules/examples/src/forms/index.es6 b/modules/examples/src/forms/index.es6 index 422f10da6d..5f5dfd9777 100644 --- a/modules/examples/src/forms/index.es6 +++ b/modules/examples/src/forms/index.es6 @@ -1,5 +1,5 @@ import {bootstrap, If, For, EventEmitter} from 'angular2/angular2'; -import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms'; +import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms'; // TODO(radokirov): Once the application is transpiled by TS instead of Traceur, // add those imports back into 'angular2/angular2'; @@ -42,7 +42,7 @@ import {View} from 'angular2/src/core/annotations_impl/view';
`, - directives: [FormDirectives, If] + directives: [formDirectives, If] }) class HeaderFields { header:ControlGroup; @@ -101,7 +101,7 @@ class HeaderFields { `, - directives: [FormDirectives, If] + directives: [formDirectives, If] }) class SurveyQuestion { question:ControlGroup; @@ -144,7 +144,7 @@ class SurveyQuestion { `, - directives: [FormDirectives, For, HeaderFields, SurveyQuestion] + directives: [formDirectives, For, HeaderFields, SurveyQuestion] }) class SurveyBuilder { form:ControlGroup;