fix: rename FORWARD_REF to forwardRef in the Angular code base.

Now that ts2dart understands forwardRef, there's
no need to maintain the old syntax.
This commit is contained in:
Martin Probst 2015-06-11 18:49:07 -07:00
parent 13466604f9
commit c4ecbf0a7f
9 changed files with 17 additions and 19 deletions

View File

@ -34,8 +34,6 @@ export function forwardRef(forwardRefFn: ForwardRefFn): Type {
return (<Type><any>forwardRefFn);
}
export var FORWARD_REF = forwardRef;
/**
* Lazily retrieve the reference value.
*

View File

@ -1,5 +1,5 @@
import {Directive, Ancestor, onDestroy, onInit} from 'angular2/angular2';
import {Inject, FORWARD_REF, Binding} from 'angular2/di';
import {Inject, forwardRef, Binding} from 'angular2/di';
import {List, ListWrapper} from 'angular2/src/facade/collection';
import {CONST_EXPR} from 'angular2/src/facade/lang';
@ -7,7 +7,7 @@ import {ControlContainer} from './control_container';
import {controlPath} from './shared';
const controlGroupBinding =
CONST_EXPR(new Binding(ControlContainer, {toAlias: FORWARD_REF(() => NgControlGroup)}));
CONST_EXPR(new Binding(ControlContainer, {toAlias: forwardRef(() => NgControlGroup)}));
/**
* Creates and binds a control group to a DOM element.

View File

@ -2,7 +2,7 @@ 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, Ancestor, onDestroy, onChange} from 'angular2/angular2';
import {FORWARD_REF, Binding, Inject} from 'angular2/di';
import {forwardRef, Binding, Inject} from 'angular2/di';
import {ControlContainer} from './control_container';
import {NgControl} from './ng_control';
@ -10,7 +10,7 @@ import {controlPath} from './shared';
import {Control} from '../model';
const controlNameBinding =
CONST_EXPR(new Binding(NgControl, {toAlias: FORWARD_REF(() => NgControlName)}));
CONST_EXPR(new Binding(NgControl, {toAlias: forwardRef(() => NgControlName)}));
/**
* Creates and binds a control with a specified name to a DOM element.

View File

@ -2,7 +2,7 @@ import {PromiseWrapper, ObservableWrapper, EventEmitter} from 'angular2/src/faca
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 {FORWARD_REF, Binding} from 'angular2/di';
import {forwardRef, Binding} from 'angular2/di';
import {NgControl} from './ng_control';
import {Form} from './form_interface';
import {NgControlGroup} from './ng_control_group';
@ -11,7 +11,7 @@ import {AbstractControl, ControlGroup, Control} from '../model';
import {setUpControl} from './shared';
const formDirectiveBinding =
CONST_EXPR(new Binding(ControlContainer, {toAlias: FORWARD_REF(() => NgForm)}));
CONST_EXPR(new Binding(ControlContainer, {toAlias: forwardRef(() => NgForm)}));
/**
* Creates and binds a form object to a DOM element.

View File

@ -3,14 +3,14 @@ import {StringMapWrapper} from 'angular2/src/facade/collection';
import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {Directive, Ancestor, onChange} from 'angular2/angular2';
import {FORWARD_REF, Binding} from 'angular2/di';
import {forwardRef, Binding} from 'angular2/di';
import {NgControl} from './ng_control';
import {Control} from '../model';
import {setUpControl} from './shared';
const formControlBinding =
CONST_EXPR(new Binding(NgControl, {toAlias: FORWARD_REF(() => NgFormControl)}));
CONST_EXPR(new Binding(NgControl, {toAlias: forwardRef(() => NgFormControl)}));
/**
* Binds an existing control to a DOM element.

View File

@ -3,7 +3,7 @@ import {List, ListWrapper} from 'angular2/src/facade/collection';
import {ObservableWrapper, EventEmitter} from 'angular2/src/facade/async';
import {Directive, onChange} from 'angular2/angular2';
import {FORWARD_REF, Binding} from 'angular2/di';
import {forwardRef, Binding} from 'angular2/di';
import {NgControl} from './ng_control';
import {NgControlGroup} from './ng_control_group';
import {ControlContainer} from './control_container';
@ -12,7 +12,7 @@ import {Control, ControlGroup} from '../model';
import {setUpControl} from './shared';
const formDirectiveBinding =
CONST_EXPR(new Binding(ControlContainer, {toAlias: FORWARD_REF(() => NgFormModel)}));
CONST_EXPR(new Binding(ControlContainer, {toAlias: forwardRef(() => NgFormModel)}));
/**
* Binds an existing control group to a DOM element.

View File

@ -3,14 +3,14 @@ import {EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {StringMapWrapper} from 'angular2/src/facade/collection';
import {Directive, Ancestor, onChange} from 'angular2/angular2';
import {FORWARD_REF, Binding} from 'angular2/di';
import {forwardRef, Binding} from 'angular2/di';
import {NgControl} from './ng_control';
import {Control} from '../model';
import {setUpControl} from './shared';
const formControlBinding =
CONST_EXPR(new Binding(NgControl, {toAlias: FORWARD_REF(() => NgModel)}));
CONST_EXPR(new Binding(NgControl, {toAlias: forwardRef(() => NgModel)}));
/**
* Binds a domain model to the form.

View File

@ -34,7 +34,7 @@ import {
} from 'angular2/src/facade/lang';
import {PromiseWrapper, EventEmitter, ObservableWrapper} from 'angular2/src/facade/async';
import {Injector, bind, Injectable, Binding, FORWARD_REF, OpaqueToken, Inject} from 'angular2/di';
import {Injector, bind, Injectable, Binding, forwardRef, OpaqueToken, Inject} from 'angular2/di';
import {
PipeRegistry,
defaultPipeRegistry,
@ -1692,11 +1692,11 @@ function createParentBusView(p) {
viewInjector: [
new Binding(
EventBus,
{toFactory: createParentBusView, deps: [[FORWARD_REF(() => ParentProvidingEventBus)]]})
{toFactory: createParentBusView, deps: [[forwardRef(() => ParentProvidingEventBus)]]})
]
})
@View({
directives: [FORWARD_REF(() => ChildConsumingEventBus)],
directives: [forwardRef(() => ChildConsumingEventBus)],
template: `
<child-consuming-event-bus></child-consuming-event-bus>
`

View File

@ -8,7 +8,7 @@ import {
ComponentRef,
DomRenderer
} from 'angular2/angular2';
import {bind, Injector, Injectable, FORWARD_REF} from 'angular2/di';
import {bind, Injector, Injectable, forwardRef} from 'angular2/di';
import {ObservableWrapper, Promise, PromiseWrapper} from 'angular2/src/facade/async';
import {isPresent, Type} from 'angular2/src/facade/lang';
@ -213,7 +213,7 @@ export class MdDialogConfig {
})
@View({
templateUrl: 'angular2_material/src/components/dialog/dialog.html',
directives: [FORWARD_REF(() => MdDialogContent)]
directives: [forwardRef(() => MdDialogContent)]
})
class MdDialogContainer {
// Ref to the dialog content. Used by the DynamicComponentLoader to load the dialog content.