From e5405e4ba2465b36f72b7233ca36039b428bf40b Mon Sep 17 00:00:00 2001 From: gdi2290 Date: Thu, 2 Jul 2015 14:20:50 -0700 Subject: [PATCH] fix(forms): Remove cyclic dependency correctly resolve Renderer by removing cyclic dependencies Closes #2856 --- .../angular2/src/forms/directives/checkbox_value_accessor.ts | 5 ++++- .../angular2/src/forms/directives/default_value_accessor.ts | 4 +++- modules/angular2/src/forms/directives/ng_control_group.ts | 2 +- modules/angular2/src/forms/directives/ng_control_name.ts | 3 ++- modules/angular2/src/forms/directives/ng_form.ts | 2 +- modules/angular2/src/forms/directives/ng_form_control.ts | 3 ++- modules/angular2/src/forms/directives/ng_form_model.ts | 2 +- modules/angular2/src/forms/directives/ng_model.ts | 3 ++- .../src/forms/directives/select_control_value_accessor.ts | 5 ++++- modules/angular2/src/forms/directives/shared.ts | 3 ++- modules/angular2/src/forms/directives/validators.ts | 2 +- 11 files changed, 23 insertions(+), 11 deletions(-) diff --git a/modules/angular2/src/forms/directives/checkbox_value_accessor.ts b/modules/angular2/src/forms/directives/checkbox_value_accessor.ts index 871730bb9e..e7a1944409 100644 --- a/modules/angular2/src/forms/directives/checkbox_value_accessor.ts +++ b/modules/angular2/src/forms/directives/checkbox_value_accessor.ts @@ -1,4 +1,7 @@ -import {Directive, Renderer, ElementRef} from 'angular2/angular2'; +import {Renderer} from 'angular2/render'; +import {Directive} from 'angular2/annotations'; +import {ElementRef} from 'angular2/core'; + import {NgControl} from './ng_control'; import {ControlValueAccessor} from './control_value_accessor'; import {isPresent} from 'angular2/src/facade/lang'; diff --git a/modules/angular2/src/forms/directives/default_value_accessor.ts b/modules/angular2/src/forms/directives/default_value_accessor.ts index f783d59ee5..2aeaf45f48 100644 --- a/modules/angular2/src/forms/directives/default_value_accessor.ts +++ b/modules/angular2/src/forms/directives/default_value_accessor.ts @@ -1,4 +1,6 @@ -import {Directive, Renderer, ElementRef} from 'angular2/angular2'; +import {Renderer} from 'angular2/render'; +import {Directive} from 'angular2/annotations'; +import {ElementRef} from 'angular2/core'; import {NgControl} from './ng_control'; import {ControlValueAccessor} from './control_value_accessor'; import {isBlank, isPresent} from 'angular2/src/facade/lang'; diff --git a/modules/angular2/src/forms/directives/ng_control_group.ts b/modules/angular2/src/forms/directives/ng_control_group.ts index c754902ca4..8687f2ad9c 100644 --- a/modules/angular2/src/forms/directives/ng_control_group.ts +++ b/modules/angular2/src/forms/directives/ng_control_group.ts @@ -1,4 +1,4 @@ -import {Directive, onDestroy, onInit} from 'angular2/angular2'; +import {Directive, onDestroy, onInit} from 'angular2/annotations'; import {Inject, Ancestor, forwardRef, Binding} from 'angular2/di'; import {List, ListWrapper} from 'angular2/src/facade/collection'; import {CONST_EXPR} from 'angular2/src/facade/lang'; diff --git a/modules/angular2/src/forms/directives/ng_control_name.ts b/modules/angular2/src/forms/directives/ng_control_name.ts index de96be10da..b9deab3dea 100644 --- a/modules/angular2/src/forms/directives/ng_control_name.ts +++ b/modules/angular2/src/forms/directives/ng_control_name.ts @@ -2,7 +2,8 @@ import {CONST_EXPR} from 'angular2/src/facade/lang'; import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async'; import {List, StringMapWrapper, StringMap} from 'angular2/src/facade/collection'; -import {Directive, onDestroy, onChange, Query, QueryList} from 'angular2/angular2'; +import {Directive, Query, onDestroy, onChange} from 'angular2/annotations'; +import {QueryList} from 'angular2/core'; import {forwardRef, Ancestor, Binding, Inject} from 'angular2/di'; import {ControlContainer} from './control_container'; diff --git a/modules/angular2/src/forms/directives/ng_form.ts b/modules/angular2/src/forms/directives/ng_form.ts index bcda35118b..33267eba1d 100644 --- a/modules/angular2/src/forms/directives/ng_form.ts +++ b/modules/angular2/src/forms/directives/ng_form.ts @@ -1,7 +1,7 @@ import {PromiseWrapper, ObservableWrapper, EventEmitter} from 'angular2/src/facade/async'; import {StringMapWrapper, List, ListWrapper} from 'angular2/src/facade/collection'; import {isPresent, isBlank, CONST_EXPR} from 'angular2/src/facade/lang'; -import {Directive} from 'angular2/src/core/annotations/decorators'; +import {Directive} from 'angular2/annotations'; import {forwardRef, Binding} from 'angular2/di'; import {NgControl} from './ng_control'; import {Form} from './form_interface'; diff --git a/modules/angular2/src/forms/directives/ng_form_control.ts b/modules/angular2/src/forms/directives/ng_form_control.ts index 78a9fdcfad..3ee86548df 100644 --- a/modules/angular2/src/forms/directives/ng_form_control.ts +++ b/modules/angular2/src/forms/directives/ng_form_control.ts @@ -2,7 +2,8 @@ import {CONST_EXPR} from 'angular2/src/facade/lang'; import {StringMapWrapper} from 'angular2/src/facade/collection'; import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async'; -import {Directive, onChange, Query, QueryList} from 'angular2/angular2'; +import {Directive, Query, onChange} from 'angular2/annotations'; +import {QueryList} from 'angular2/core'; import {forwardRef, Ancestor, Binding} from 'angular2/di'; import {NgControl} from './ng_control'; diff --git a/modules/angular2/src/forms/directives/ng_form_model.ts b/modules/angular2/src/forms/directives/ng_form_model.ts index 8b1e21f466..6efc464cf2 100644 --- a/modules/angular2/src/forms/directives/ng_form_model.ts +++ b/modules/angular2/src/forms/directives/ng_form_model.ts @@ -2,7 +2,7 @@ import {CONST_EXPR} from 'angular2/src/facade/lang'; import {List, ListWrapper} from 'angular2/src/facade/collection'; import {ObservableWrapper, EventEmitter} from 'angular2/src/facade/async'; -import {Directive, onChange} from 'angular2/angular2'; +import {Directive, onChange} from 'angular2/annotations'; import {forwardRef, Binding} from 'angular2/di'; import {NgControl} from './ng_control'; import {NgControlGroup} from './ng_control_group'; diff --git a/modules/angular2/src/forms/directives/ng_model.ts b/modules/angular2/src/forms/directives/ng_model.ts index 42580e606a..614bca23fb 100644 --- a/modules/angular2/src/forms/directives/ng_model.ts +++ b/modules/angular2/src/forms/directives/ng_model.ts @@ -2,7 +2,8 @@ import {CONST_EXPR} from 'angular2/src/facade/lang'; import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async'; import {StringMapWrapper} from 'angular2/src/facade/collection'; -import {Directive, onChange, QueryList, Query} from 'angular2/angular2'; +import {Directive, Query, onChange} from 'angular2/annotations'; +import {QueryList} from 'angular2/core'; import {forwardRef, Ancestor, Binding} from 'angular2/di'; import {NgControl} from './ng_control'; diff --git a/modules/angular2/src/forms/directives/select_control_value_accessor.ts b/modules/angular2/src/forms/directives/select_control_value_accessor.ts index b7f5568cd4..8d24d3d73a 100644 --- a/modules/angular2/src/forms/directives/select_control_value_accessor.ts +++ b/modules/angular2/src/forms/directives/select_control_value_accessor.ts @@ -1,4 +1,7 @@ -import {Directive, Query, QueryList, Renderer, ElementRef} from 'angular2/angular2'; +import {Renderer} from 'angular2/render'; +import {ElementRef, QueryList} from 'angular2/core'; +import {Directive, Query, onDestroy, onChange} from 'angular2/annotations'; + import {NgControl} from './ng_control'; import {ControlValueAccessor} from './control_value_accessor'; import {isPresent} from 'angular2/src/facade/lang'; diff --git a/modules/angular2/src/forms/directives/shared.ts b/modules/angular2/src/forms/directives/shared.ts index cf5f4932a5..76bd1e3d2a 100644 --- a/modules/angular2/src/forms/directives/shared.ts +++ b/modules/angular2/src/forms/directives/shared.ts @@ -6,7 +6,8 @@ import {NgControl} from './ng_control'; import {NgValidator} from './validators'; import {Control} from '../model'; import {Validators} from '../validators'; -import {Renderer, ElementRef, QueryList} from 'angular2/angular2'; +import {Renderer} from 'angular2/render'; +import {ElementRef, QueryList} from 'angular2/core'; export function controlPath(name: string, parent: ControlContainer): string[] { diff --git a/modules/angular2/src/forms/directives/validators.ts b/modules/angular2/src/forms/directives/validators.ts index 6a96156f6a..4dcc895938 100644 --- a/modules/angular2/src/forms/directives/validators.ts +++ b/modules/angular2/src/forms/directives/validators.ts @@ -1,6 +1,6 @@ import {forwardRef, Binding} from 'angular2/di'; import {CONST_EXPR} from 'angular2/src/facade/lang'; -import {Directive} from '../../../angular2'; +import {Directive} from 'angular2/annotations'; import {Validators} from '../validators'; export class NgValidator {