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

@ -6,7 +6,7 @@ import {
Component,
Directive,
View,
Ancestor
Host
} from 'angular2/bootstrap';
import {formDirectives, NgControl, Validators, NgFormModel, FormBuilder} from 'angular2/forms';
@ -50,7 +50,7 @@ class ShowError {
controlPath: string;
errorTypes: List<string>;
constructor(@Ancestor() formDir: NgFormModel) { this.formDir = formDir; }
constructor(@Host() formDir: NgFormModel) { this.formDir = formDir; }
get errorMessage() {
var c = this.formDir.form.find(this.controlPath);

View File

@ -6,7 +6,7 @@ import {
Component,
Directive,
View,
Ancestor,
Host,
NgValidator,
forwardRef,
Binding,

View File

@ -6,7 +6,7 @@ import {
Component,
Directive,
View,
Ancestor,
Host,
NgValidator,
forwardRef,
Binding

View File

@ -6,7 +6,7 @@ import {
Component,
Directive,
View,
Ancestor,
Host,
NgValidator,
forwardRef,
Binding
@ -76,7 +76,7 @@ class ShowError {
controlPath: string;
errorTypes: List<string>;
constructor(@Ancestor() formDir: NgForm) { this.formDir = formDir; }
constructor(@Host() formDir: NgForm) { this.formDir = formDir; }
get errorMessage() {
var c = this.formDir.form.find(this.controlPath);