refactor(forms): made directive names consistent

This commit is contained in:
vsavkin
2015-06-10 13:51:44 -07:00
parent a858f6ac42
commit 4fe919335c
24 changed files with 150 additions and 162 deletions

View File

@ -24,10 +24,10 @@ import {NgIf} from 'angular2/directives';
import {
Control,
ControlGroup,
TemplateDrivenFormDirective,
NgForm,
formDirectives,
Validators,
ControlDirective,
NgControl,
ControlValueAccessor
} from 'angular2/forms';
@ -481,7 +481,7 @@ export function main() {
.then((view) => {
view.detectChanges();
var form =
view.rawView.elementInjectors[0].get(TemplateDrivenFormDirective);
view.rawView.elementInjectors[0].get(NgForm);
expect(form.controls['user']).not.toBeDefined();
tick();
@ -536,7 +536,7 @@ export function main() {
.then((view) => {
view.detectChanges();
var form = view.rawView.elementInjectors[0].get(
TemplateDrivenFormDirective);
NgForm);
tick();
@ -566,7 +566,7 @@ export function main() {
.then((view) => {
view.detectChanges();
var form =
view.rawView.elementInjectors[0].get(TemplateDrivenFormDirective);
view.rawView.elementInjectors[0].get(NgForm);
flushMicrotasks();
expect(form.controls['user']).toBeDefined();
@ -739,7 +739,7 @@ class WrappedValue implements ControlValueAccessor {
value;
onChange: Function;
constructor(cd: ControlDirective) { cd.valueAccessor = this; }
constructor(cd: NgControl) { cd.valueAccessor = this; }
writeValue(value) { this.value = `!${value}!`; }