refactor: rename annotations to metadata
BREAKING CHANGE (maybe) Well as long as our customers use public API this should not be a breaking change, but we have changed import structure as well as internal names, so it could be breaking. import: angular2/annotations => angular2/metadata Classes: *Annotations => *Metadata renderer.DirectiveMetadata => renderer.RendererDirectiveMetadata renderer.ElementBinder => renderer.RendererElementBinder impl.Directive => impl.DirectiveMetadata impl.Component => impl.ComponentMetadata impl.View => impl.ViewMetadata Closes #3660
This commit is contained in:

committed by
Miško Hevery

parent
5e6317fecc
commit
ea6673947c
@ -4,7 +4,7 @@ import {Type, isPresent, BaseException, isBlank} from 'angular2/src/facade/lang'
|
||||
import {Promise} from 'angular2/src/facade/async';
|
||||
import {List, ListWrapper, MapWrapper} from 'angular2/src/facade/collection';
|
||||
|
||||
import {View} from 'angular2/src/core/annotations_impl/view';
|
||||
import {ViewMetadata} from '../core/metadata';
|
||||
|
||||
import {ViewResolver} from 'angular2/src/core/compiler/view_resolver';
|
||||
import {AppView} from 'angular2/src/core/compiler/view';
|
||||
@ -48,7 +48,7 @@ var _nextRootElementId = 0;
|
||||
@Injectable()
|
||||
export class TestComponentBuilder {
|
||||
_injector: Injector;
|
||||
_viewOverrides: Map<Type, View>;
|
||||
_viewOverrides: Map<Type, ViewMetadata>;
|
||||
_directiveOverrides: Map<Type, Map<Type, Type>>;
|
||||
_templateOverrides: Map<Type, string>;
|
||||
|
||||
@ -68,8 +68,8 @@ export class TestComponentBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides only the html of a {@link Component}.
|
||||
* All the other properties of the component's {@link View} are preserved.
|
||||
* Overrides only the html of a {@link ComponentMetadata}.
|
||||
* All the other properties of the component's {@link ViewMetadata} are preserved.
|
||||
*
|
||||
* @param {Type} component
|
||||
* @param {string} html
|
||||
@ -83,21 +83,21 @@ export class TestComponentBuilder {
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides a component's {@link View}.
|
||||
* Overrides a component's {@link ViewMetadata}.
|
||||
*
|
||||
* @param {Type} component
|
||||
* @param {view} View
|
||||
*
|
||||
* @return {TestComponentBuilder}
|
||||
*/
|
||||
overrideView(componentType: Type, view: View): TestComponentBuilder {
|
||||
overrideView(componentType: Type, view: ViewMetadata): TestComponentBuilder {
|
||||
var clone = this._clone();
|
||||
clone._viewOverrides.set(componentType, view);
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the directives from the component {@link View}.
|
||||
* Overrides the directives from the component {@link ViewMetadata}.
|
||||
*
|
||||
* @param {Type} component
|
||||
* @param {Type} from
|
||||
|
Reference in New Issue
Block a user