cleanup(DI): clean up visibility decorators

BREAKING CHANGE:
    Replace @Ancestor() with @Host() @SkipSelf()
    Replace @Unbounded() wwith @SkipSelf()
    Replace @Ancestor({self:true}) with @Host()
    Replace @Unbounded({self:true}) with nothing
    Replace new AncestorMetadata() with [new HostMetadata(), new SkipSelfMetadata()]
    Replace new UnboundedMetadata() with new SkipSelfMetadata()
    Replace new Ancestor({self:true}) with new HostMetadata()
This commit is contained in:
vsavkin
2015-07-29 11:26:09 -07:00
parent a9ec6b9064
commit 985627bd65
27 changed files with 246 additions and 268 deletions

View File

@ -4,7 +4,7 @@ import {List, StringMap} from 'angular2/src/facade/collection';
import {QueryList} from 'angular2/core';
import {Query, Directive, LifecycleEvent} from 'angular2/annotations';
import {forwardRef, Ancestor, Binding, Inject} from 'angular2/di';
import {forwardRef, Host, SkipSelf, Binding, Inject} from 'angular2/di';
import {ControlContainer} from './control_container';
import {NgControl} from './ng_control';
@ -88,7 +88,7 @@ export class NgControlName extends NgControl {
_added = false;
// Scope the query once https://github.com/angular/angular/issues/2603 is fixed
constructor(@Ancestor() parent: ControlContainer,
constructor(@Host() @SkipSelf() parent: ControlContainer,
@Query(NgValidator) ngValidators: QueryList<NgValidator>) {
super();
this._parent = parent;