refactor(core): remove …Metadata for all decorators and use the decorator directly.

BREAKING CHANGE:
- all `…Metadata` classes have been removed. Use the corresponding decorator
  as constructor or for `instanceof` checks instead.
- Example:
  * Before: `new ComponentMetadata(…)`
  * After: `new Component(…)`
- Note: `new Component(…)` worked before as well.
This commit is contained in:
Tobias Bosch
2016-09-12 19:14:17 -07:00
committed by Igor Minar
parent 1b15170c89
commit 63e15ffaec
40 changed files with 229 additions and 279 deletions
@@ -132,7 +132,7 @@ export class AnimationGroupMetadata extends AnimationWithStepsMetadata {
* `animate` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `animate` specifies an animation step that will apply the provided `styles` data for a given
@@ -195,7 +195,7 @@ export function animate(
* `group` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `group` specifies a list of animation steps that are all run in parallel. Grouped animations
@@ -237,7 +237,7 @@ export function group(steps: AnimationMetadata[]): AnimationGroupMetadata {
* `sequence` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `sequence` Specifies a list of animation steps that are run one by one. (`sequence` is used
@@ -280,7 +280,7 @@ export function sequence(steps: AnimationMetadata[]): AnimationSequenceMetadata
* `style` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `style` declares a key/value object containing CSS properties/styles that can then
@@ -350,7 +350,7 @@ export function style(
* `state` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `state` declares an animation state within the given trigger. When a state is
@@ -409,7 +409,7 @@ export function state(
* `keyframes` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `keyframes` specifies a collection of {@link style style} entries each optionally characterized
@@ -462,7 +462,7 @@ export function keyframes(steps: AnimationStyleMetadata[]): AnimationKeyframesSe
* `transition` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `transition` declares the {@link sequence sequence of animation steps} that will be run when the
@@ -557,7 +557,7 @@ export function transition(stateChangeExpr: string, steps: AnimationMetadata | A
* `trigger` is an animation-specific function that is designed to be used inside of Angular2's
* animation
* DSL language. If this information is new, please navigate to the
* {@link ComponentMetadata#animations-anchor component animations metadata
* {@link Component#animations-anchor component animations metadata
* page} to gain a better understanding of how animations in Angular2 are used.
*
* `trigger` Creates an animation trigger which will a list of {@link state state} and {@link
@@ -565,7 +565,7 @@ export function transition(stateChangeExpr: string, steps: AnimationMetadata | A
* entries that will be evaluated when the expression bound to the trigger changes.
*
* Triggers are registered within the component annotation data under the
* {@link ComponentMetadata#animations-anchor animations section}. An animation trigger can
* {@link Component#animations-anchor animations section}. An animation trigger can
* be placed on an element within a template by referencing the name of the
* trigger followed by the expression value that the trigger is bound to
* (in the form of `[@triggerName]="expression"`.
@@ -29,7 +29,7 @@ export function devModeEqual(a: any, b: any): boolean {
}
/**
* Indicates that the result of a {@link PipeMetadata} transformation has changed even though the
* Indicates that the result of a {@link Pipe} transformation has changed even though the
* reference
* has not changed.
*
@@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {OptionalMetadata, Provider, SkipSelfMetadata} from '../../di';
import {Optional, Provider, SkipSelf} from '../../di';
import {ListWrapper} from '../../facade/collection';
import {getTypeNameForDebugging, isBlank, isPresent} from '../../facade/lang';
import {ChangeDetectorRef} from '../change_detector_ref';
@@ -91,7 +91,7 @@ export class IterableDiffers {
return IterableDiffers.create(factories, parent);
},
// Dependency technically isn't optional, but we can provide a better error message this way.
deps: [[IterableDiffers, new SkipSelfMetadata(), new OptionalMetadata()]]
deps: [[IterableDiffers, new SkipSelf(), new Optional()]]
};
}
@@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/
import {OptionalMetadata, Provider, SkipSelfMetadata} from '../../di';
import {Optional, Provider, SkipSelf} from '../../di';
import {ListWrapper} from '../../facade/collection';
import {isBlank, isPresent} from '../../facade/lang';
import {ChangeDetectorRef} from '../change_detector_ref';
@@ -81,7 +81,7 @@ export class KeyValueDiffers {
return KeyValueDiffers.create(factories, parent);
},
// Dependency technically isn't optional, but we can provide a better error message this way.
deps: [[KeyValueDiffers, new SkipSelfMetadata(), new OptionalMetadata()]]
deps: [[KeyValueDiffers, new SkipSelf(), new Optional()]]
};
}
+12 -22
View File
@@ -14,7 +14,7 @@ import {makeParamDecorator} from '../util/decorators';
*
* @stable
*/
export interface InjectMetadataFactory {
export interface InjectDecorator {
/**
* A parameter metadata that specifies a dependency.
*
@@ -74,7 +74,7 @@ export interface Inject { token: any; }
* @stable
* @Annotation
*/
export const Inject: InjectMetadataFactory = makeParamDecorator([['token', undefined]]);
export const Inject: InjectDecorator = makeParamDecorator([['token', undefined]]);
/**
@@ -82,7 +82,7 @@ export const Inject: InjectMetadataFactory = makeParamDecorator([['token', undef
*
* @stable
*/
export interface OptionalMetadataFactory {
export interface OptionalDecorator {
/**
* A parameter metadata that marks a dependency as optional. {@link Injector} provides `null` if
* the dependency is not found.
@@ -122,14 +122,14 @@ export interface Optional {}
* @stable
* @Annotation
*/
export const Optional: OptionalMetadataFactory = makeParamDecorator([]);
export const Optional: OptionalDecorator = makeParamDecorator([]);
/**
* Type of the Injectable decorator / constructor function.
*
* @stable
*/
export interface InjectableMetadataFactory {
export interface InjectableDecorator {
/**
* A marker metadata that marks a class as available to {@link Injector} for creation.
*
@@ -179,14 +179,14 @@ export interface Injectable {}
* @stable
* @Annotation
*/
export const Injectable: InjectableMetadataFactory = makeParamDecorator([]);
export const Injectable: InjectableDecorator = makeParamDecorator([]);
/**
* Type of the Self decorator / constructor function.
*
* @stable
*/
export interface SelfMetadataFactory {
export interface SelfDecorator {
/**
* Specifies that an {@link Injector} should retrieve a dependency only from itself.
*
@@ -232,7 +232,7 @@ export interface Self {}
* @stable
* @Annotation
*/
export const Self: SelfMetadataFactory = makeParamDecorator([]);
export const Self: SelfDecorator = makeParamDecorator([]);
/**
@@ -240,7 +240,7 @@ export const Self: SelfMetadataFactory = makeParamDecorator([]);
*
* @stable
*/
export interface SkipSelfMetadataFactory {
export interface SkipSelfDecorator {
/**
* Specifies that the dependency resolution should start from the parent injector.
*
@@ -284,14 +284,14 @@ export interface SkipSelf {}
* @stable
* @Annotation
*/
export const SkipSelf: SkipSelfMetadataFactory = makeParamDecorator([]);
export const SkipSelf: SkipSelfDecorator = makeParamDecorator([]);
/**
* Type of the Host decorator / constructor function.
*
* @stable
*/
export interface HostMetadataFactory {
export interface HostDecorator {
/**
* Specifies that an injector should retrieve a dependency from any injector until reaching the
* closest host.
@@ -362,14 +362,4 @@ export interface Host {}
* @stable
* @Annotation
*/
export const Host: HostMetadataFactory = makeParamDecorator([]);
// TODO(tbosch): remove this
export {
Host as HostMetadata,
Inject as InjectMetadata,
Injectable as InjectableMetadata,
Optional as OptionalMetadata,
Self as SelfMetadata,
SkipSelf as SkipSelfMetadata
};
export const Host: HostDecorator = makeParamDecorator([]);
@@ -11,7 +11,7 @@ import {unimplemented} from '../facade/errors';
import {Type} from '../type';
import {Injector, THROW_IF_NOT_FOUND} from './injector';
import {SelfMetadata, SkipSelfMetadata} from './metadata';
import {Self, SkipSelf} from './metadata';
import {Provider} from './provider';
import {AbstractProviderError, CyclicDependencyError, InstantiationError, NoProviderError, OutOfBoundsError} from './reflective_errors';
import {ReflectiveKey} from './reflective_key';
@@ -807,7 +807,7 @@ export class ReflectiveInjector_ implements ReflectiveInjector {
return this;
}
if (upperBoundVisibility instanceof SelfMetadata) {
if (upperBoundVisibility instanceof Self) {
return this._getByKeySelf(key, notFoundValue);
} else {
@@ -834,7 +834,7 @@ export class ReflectiveInjector_ implements ReflectiveInjector {
_getByKeyDefault(key: ReflectiveKey, notFoundValue: any, lowerBoundVisibility: Object): any {
var inj: Injector;
if (lowerBoundVisibility instanceof SkipSelfMetadata) {
if (lowerBoundVisibility instanceof SkipSelf) {
inj = this._parent;
} else {
inj = this;
@@ -12,7 +12,7 @@ import {reflector} from '../reflection/reflection';
import {Type} from '../type';
import {resolveForwardRef} from './forward_ref';
import {HostMetadata, InjectMetadata, OptionalMetadata, SelfMetadata, SkipSelfMetadata} from './metadata';
import {Host, Inject, Optional, Self, SkipSelf} from './metadata';
import {ClassProvider, ExistingProvider, FactoryProvider, Provider, TypeProvider, ValueProvider} from './provider';
import {InvalidProviderError, MixingMultiProvidersWithRegularProvidersError, NoAnnotationError} from './reflective_errors';
import {ReflectiveKey} from './reflective_key';
@@ -226,7 +226,7 @@ function _extractToken(
var optional = false;
if (!isArray(metadata)) {
if (metadata instanceof InjectMetadata) {
if (metadata instanceof Inject) {
return _createDependency(metadata.token, optional, null, null, depProps);
} else {
return _createDependency(metadata, optional, null, null, depProps);
@@ -242,19 +242,19 @@ function _extractToken(
if (paramMetadata instanceof Type) {
token = paramMetadata;
} else if (paramMetadata instanceof InjectMetadata) {
} else if (paramMetadata instanceof Inject) {
token = paramMetadata.token;
} else if (paramMetadata instanceof OptionalMetadata) {
} else if (paramMetadata instanceof Optional) {
optional = true;
} else if (paramMetadata instanceof SelfMetadata) {
} else if (paramMetadata instanceof Self) {
upperBoundVisibility = paramMetadata;
} else if (paramMetadata instanceof HostMetadata) {
} else if (paramMetadata instanceof Host) {
upperBoundVisibility = paramMetadata;
} else if (paramMetadata instanceof SkipSelfMetadata) {
} else if (paramMetadata instanceof SkipSelf) {
lowerBoundVisibility = paramMetadata;
}
}
@@ -14,7 +14,7 @@ import {getSymbolIterator} from '../facade/lang';
* An unmodifiable list of items that Angular keeps up to date when the state
* of the application changes.
*
* The type of object that {@link QueryMetadata} and {@link ViewQueryMetadata} provide.
* The type of object that {@link Query} and {@link ViewQueryMetadata} provide.
*
* Implements an iterable interface, therefore it can be used in both ES6
* javascript `for (var i of items)` loops as well as in Angular templates with
-18
View File
@@ -23,21 +23,3 @@ export {Component, Directive, HostBinding, HostListener, Input, Output, Pipe} fr
export {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from './metadata/lifecycle_hooks';
export {CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NO_ERRORS_SCHEMA, NgModule, SchemaMetadata} from './metadata/ng_module';
export {ViewEncapsulation} from './metadata/view';
// TODO(vicb): delete ?
export {Directive as DirectiveMetadata};
export {Component as ComponentMetadata};
export {NgModule as NgModuleMetadata};
export {Pipe as PipeMetadata};
export {Output as OutputMetadata};
export {Input as InputMetadata};
export {HostBinding as HostBindingMetadata};
export {HostListener as HostListenerMetadata};
export {Attribute as AttributeMetadata};
export {ContentChildren as ContentChildrenMetadata};
export {ContentChild as ContentChildMetadata};
export {ViewChildren as ViewChildrenMetadata};
export {ViewChild as ViewChildMetadata};
export {Query as QueryMetadata};
+12 -13
View File
@@ -54,7 +54,7 @@ export const ANALYZE_FOR_ENTRY_COMPONENTS = new OpaqueToken('AnalyzeForEntryComp
*
* @stable
*/
export interface AttributeMetadataFactory {
export interface AttributeDecorator {
/**
* Specifies that a constant attribute value should be injected.
*
@@ -122,8 +122,7 @@ export interface Attribute { attributeName?: string; }
* @stable
* @Annotation
*/
export const Attribute: AttributeMetadataFactory =
makeParamDecorator([['attributeName', undefined]]);
export const Attribute: AttributeDecorator = makeParamDecorator([['attributeName', undefined]]);
/**
* Type of the Query metadata.
@@ -145,7 +144,7 @@ export abstract class Query {}
*
* @stable
*/
export interface ContentChildrenMetadataFactory {
export interface ContentChildrenDecorator {
/**
* Configures a content query.
*
@@ -187,7 +186,7 @@ export type ContentChildren = Query;
* @stable
* @Annotation
*/
export const ContentChildren: ContentChildrenMetadataFactory = makePropDecorator(
export const ContentChildren: ContentChildrenDecorator = makePropDecorator(
[
['selector', undefined],
{first: false, isViewQuery: false, descendants: false, read: undefined}
@@ -199,7 +198,7 @@ export const ContentChildren: ContentChildrenMetadataFactory = makePropDecorator
*
* @stable
*/
export interface ContentChildMetadataFactory {
export interface ContentChildDecorator {
/**
* Configures a content query.
*
@@ -246,7 +245,7 @@ export type ContentChild = Query;
* @stable
* @Annotation
*/
export const ContentChild: ContentChildMetadataFactory = makePropDecorator(
export const ContentChild: ContentChildDecorator = makePropDecorator(
[
['selector', undefined], {
first: true,
@@ -258,11 +257,11 @@ export const ContentChild: ContentChildMetadataFactory = makePropDecorator(
Query);
/**
* Type of the ViewChildrenMetadataFactory decorator / constructor function.
* Type of the ViewChildren decorator / constructor function.
*
* @stable
*/
export interface ViewChildrenMetadataFactory {
export interface ViewChildrenDecorator {
/**
* Declares a list of child element references.
*
@@ -357,7 +356,7 @@ export type ViewChildren = Query;
* @stable
* @Annotation
*/
export const ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(
export const ViewChildren: ViewChildrenDecorator = makePropDecorator(
[
['selector', undefined], {
first: false,
@@ -370,11 +369,11 @@ export const ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(
/**
* Type of the ViewChildMetadataFactory decorator / constructor function.
* Type of the ViewChild decorator / constructor function.
*
* @stable
*/
export interface ViewChildMetadataFactory {
export interface ViewChildDecorator {
/**
*
* Declares a reference of child element.
@@ -462,7 +461,7 @@ export type ViewChild = Query;
* @stable
* @Annotation
*/
export const ViewChild: ViewChildMetadataFactory = makePropDecorator(
export const ViewChild: ViewChildDecorator = makePropDecorator(
[
['selector', undefined], {
first: true,
@@ -8,7 +8,7 @@
import {AnimationEntryMetadata} from '../animation/metadata';
import {ChangeDetectionStrategy} from '../change_detection/constants';
import {InjectableMetadata, Provider} from '../di';
import {Injectable, Provider} from '../di';
import {isPresent} from '../facade/lang';
import {Type} from '../type';
import {TypeDecorator, makeDecorator, makePropDecorator} from '../util/decorators';
@@ -21,11 +21,11 @@ import {ViewEncapsulation} from './view';
*
* @stable
*/
export interface DirectiveMetadataFactory {
export interface DirectiveDecorator {
/**
* Directives allow you to attach behavior to elements in the DOM.
*
* {@link DirectiveMetadata}s with an embedded view are called {@link ComponentMetadata}s.
* {@link Directive}s with an embedded view are called {@link Component}s.
*
* A directive consists of a single directive annotation and a controller class. When the
* directive's `selector` matches
@@ -59,7 +59,7 @@ export interface DirectiveMetadataFactory {
*
* Angular then resolves dependencies as follows, according to the order in which they appear in
* the
* {@link ComponentMetadata}:
* {@link Component}:
*
* 1. Dependencies on the current element
* 2. Dependencies on element injectors and their parents until it encounters a Shadow DOM
@@ -85,7 +85,7 @@ export interface DirectiveMetadataFactory {
* To inject element-specific special objects, declare the constructor parameter as:
* - `element: ElementRef` to obtain a reference to logical element in the view.
* - `viewContainer: ViewContainerRef` to control child template instantiation, for
* {@link DirectiveMetadata} directives only
* {@link Directive} directives only
* - `bindingPropagation: BindingPropagation` to control change detection in a more granular way.
*
* ### Example
@@ -311,7 +311,7 @@ export interface DirectiveMetadataFactory {
* location in the current view
* where these actions are performed.
*
* Views are always created as children of the current {@link ComponentMetadata}, and as siblings
* Views are always created as children of the current {@link Component}, and as siblings
* of
* the
* `<template>` element. Thus a
@@ -770,7 +770,7 @@ export interface Directive {
* @stable
* @Annotation
*/
export const Directive: DirectiveMetadataFactory = <DirectiveMetadataFactory>makeDecorator({
export const Directive: DirectiveDecorator = <DirectiveDecorator>makeDecorator({
selector: undefined,
inputs: undefined,
outputs: undefined,
@@ -785,7 +785,7 @@ export const Directive: DirectiveMetadataFactory = <DirectiveMetadataFactory>mak
*
* @stable
*/
export interface ComponentMetadataFactory {
export interface ComponentDecorator {
/**
* Declare reusable UI building blocks for an application.
*
@@ -1050,7 +1050,7 @@ export interface Component extends Directive {
* @stable
* @Annotation
*/
export const Component: ComponentMetadataFactory = <ComponentMetadataFactory>makeDecorator(
export const Component: ComponentDecorator = <ComponentDecorator>makeDecorator(
{
selector: undefined,
inputs: undefined,
@@ -1078,7 +1078,7 @@ export const Component: ComponentMetadataFactory = <ComponentMetadataFactory>mak
*
* @stable
*/
export interface PipeMetadataFactory {
export interface PipeDecorator {
/**
* Declare reusable pipe function.
*
@@ -1110,7 +1110,7 @@ export interface Pipe {
* @stable
* @Annotation
*/
export const Pipe: PipeMetadataFactory = <PipeMetadataFactory>makeDecorator({
export const Pipe: PipeDecorator = <PipeDecorator>makeDecorator({
name: undefined,
pure: true,
});
@@ -1121,13 +1121,13 @@ export const Pipe: PipeMetadataFactory = <PipeMetadataFactory>makeDecorator({
*
* @stable
*/
export interface InputMetadataFactory {
export interface InputDecorator {
/**
* Declares a data-bound input property.
*
* Angular automatically updates data-bound properties during change detection.
*
* `InputMetadata` takes an optional parameter that specifies the name
* `Input` takes an optional parameter that specifies the name
* used when instantiating a component in the template. When not provided,
* the name of the decorated property is used.
*
@@ -1184,21 +1184,21 @@ export interface Input {
* @stable
* @Annotation
*/
export const Input: InputMetadataFactory = makePropDecorator([['bindingPropertyName', undefined]]);
export const Input: InputDecorator = makePropDecorator([['bindingPropertyName', undefined]]);
/**
* Type of the Output decorator / constructor function.
*
* @stable
*/
export interface OutputMetadataFactory {
export interface OutputDecorator {
/**
* Declares an event-bound output property.
*
* When an output property emits an event, an event handler attached to that event
* the template is invoked.
*
* `OutputMetadata` takes an optional parameter that specifies the name
* `Output` takes an optional parameter that specifies the name
* used when instantiating a component in the template. When not provided,
* the name of the decorated property is used.
*
@@ -1249,8 +1249,7 @@ export interface Output { bindingPropertyName?: string; }
* @stable
* @Annotation
*/
export const Output: OutputMetadataFactory =
makePropDecorator([['bindingPropertyName', undefined]]);
export const Output: OutputDecorator = makePropDecorator([['bindingPropertyName', undefined]]);
/**
@@ -1258,14 +1257,14 @@ export const Output: OutputMetadataFactory =
*
* @stable
*/
export interface HostBindingMetadataFactory {
export interface HostBindingDecorator {
/**
* Declares a host property binding.
*
* Angular automatically checks host property bindings during change detection.
* If a binding changes, it will update the host element of the directive.
*
* `HostBindingMetadata` takes an optional parameter that specifies the property
* `HostBinding` takes an optional parameter that specifies the property
* name of the host element that will be updated. When not provided,
* the class property name is used.
*
@@ -1310,7 +1309,7 @@ export interface HostBinding { hostPropertyName?: string; }
* @stable
* @Annotation
*/
export const HostBinding: HostBindingMetadataFactory =
export const HostBinding: HostBindingDecorator =
makePropDecorator([['hostPropertyName', undefined]]);
@@ -1319,7 +1318,7 @@ export const HostBinding: HostBindingMetadataFactory =
*
* @stable
*/
export interface HostListenerMetadataFactory {
export interface HostListenerDecorator {
/**
* Declares a host listener.
*
@@ -1374,5 +1373,5 @@ export interface HostListener {
* @stable
* @Annotation
*/
export const HostListener: HostListenerMetadataFactory =
export const HostListener: HostListenerDecorator =
makePropDecorator([['eventName', undefined], ['args', []]]);
@@ -236,7 +236,7 @@ export abstract class DoCheck { abstract ngDoCheck(): void; }
*
*
* To create a stateful Pipe, you should implement this interface and set the `pure`
* parameter to `false` in the {@link PipeMetadata}.
* parameter to `false` in the {@link Pipe}.
*
* A stateful pipe may produce different output, given the same input. It is
* likely that a stateful pipe may contain state that should be cleaned up when
@@ -54,7 +54,7 @@ export const NO_ERRORS_SCHEMA: SchemaMetadata = {
*
* @stable
*/
export interface NgModuleMetadataFactory {
export interface NgModuleDecorator {
/**
* Defines an NgModule.
*/
@@ -191,7 +191,7 @@ export interface NgModule {
* @stable
* @Annotation
*/
export const NgModule: NgModuleMetadataFactory = <NgModuleMetadataFactory>makeDecorator({
export const NgModule: NgModuleDecorator = <NgModuleDecorator>makeDecorator({
providers: undefined,
declarations: undefined,
imports: undefined,
+2 -2
View File
@@ -53,7 +53,7 @@ export var VIEW_ENCAPSULATION_VALUES =
* When a component is instantiated, the template is loaded into the component's shadow root, and
* the expressions and statements in the template are evaluated against the component.
*
* For details on the `@Component` annotation, see {@link ComponentMetadata}.
* For details on the `@Component` annotation, see {@link Component}.
*
* ### Example
*
@@ -72,7 +72,7 @@ export var VIEW_ENCAPSULATION_VALUES =
* }
* ```
*
* @deprecated Use ComponentMetadata instead.
* @deprecated Use Component instead.
*/
export class ViewMetadata {
/**