Skip to content

Commit ea66739

Browse files
committed
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 angular#3660
1 parent 5e6317f commit ea66739

File tree

172 files changed

+1286
-1172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+1286
-1172
lines changed

docs/public-docs-package/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module.exports = new Package('angular-v2-public-docs', [basePackage])
55

66
.config(function(readTypeScriptModules) {
77
readTypeScriptModules.sourceFiles = [
8-
'angular2/annotations.ts',
8+
'angular2/metadata.ts',
99
'angular2/change_detection.ts',
1010
'angular2/core.ts',
1111
'angular2/di.ts',

modules/angular2/angular2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export {commonBootstrap as bootstrap} from 'angular2/src/core/application_common
77
// angular2_exports.ts. Re-exporting from angular2_exports.ts causes systemjs
88
// to resolve imports very very very slowly. See also a similar notice in
99
// bootstrap.ts
10-
export * from './annotations';
10+
export * from './metadata';
1111
export * from './change_detection';
1212
export * from './core';
1313
export * from './di';

modules/angular2/angular2_exports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export * from './annotations';
1+
export * from './metadata';
22
export * from './change_detection';
33
export * from './core';
44
export * from './di';

modules/angular2/annotations.ts

Lines changed: 0 additions & 50 deletions
This file was deleted.

modules/angular2/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export {bootstrap} from 'angular2/src/core/application';
77
// angular2_exports.ts. Re-exporting from angular2_exports.ts causes systemjs
88
// to resolve imports very very very slowly. See also a similar notice in
99
// angular2.ts
10-
export * from './annotations';
10+
export * from './metadata';
1111
export * from './change_detection';
1212
export * from './core';
1313
export * from './di';

modules/angular2/metadata.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
library angular2.metadata;
2+
3+
export 'package:angular2/src/core/metadata.dart';
4+
export 'package:angular2/src/core/compiler/interfaces.dart';

modules/angular2/metadata.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* @module
3+
* @description
4+
*
5+
* Annotations provide the additional information that Angular requires in order to run your
6+
* application. This module
7+
* contains {@link ComponentMetadata}, {@link DirectiveMetadata}, and {@link ViewMetadata}
8+
* annotations, as well as
9+
* the {@link Host} annotation that is used by Angular to resolve dependencies.
10+
*
11+
*/
12+
13+
export {
14+
ComponentMetadata,
15+
DirectiveMetadata,
16+
PipeMetadata,
17+
LifecycleEvent,
18+
ViewMetadata,
19+
ViewEncapsulation,
20+
QueryMetadata,
21+
AttributeMetadata,
22+
Attribute,
23+
AttributeFactory,
24+
Component,
25+
ComponentDecorator,
26+
ComponentFactory,
27+
Directive,
28+
DirectiveDecorator,
29+
DirectiveFactory,
30+
View,
31+
ViewDecorator,
32+
ViewFactory,
33+
Query,
34+
QueryFactory,
35+
ViewQuery,
36+
Pipe,
37+
PipeFactory
38+
} from './src/core/metadata';
39+
40+
export {
41+
OnAllChangesDone,
42+
OnChange,
43+
OnDestroy,
44+
OnInit,
45+
OnCheck
46+
} from './src/core/compiler/interfaces';
47+
48+
export {Class, ClassDefinition, TypeDecorator} from './src/util/decorators';

modules/angular2/render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
export {
8-
DirectiveMetadata,
8+
RenderDirectiveMetadata,
99
DomRenderer,
1010
RenderEventDispatcher,
1111
Renderer,

modules/angular2/src/change_detection/change_detection_util.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {implementsOnDestroy} from './pipe_lifecycle_reflector';
66

77

88
/**
9-
* Indicates that the result of a {@link Pipe} transformation has changed even though the reference
9+
* Indicates that the result of a {@link PipeMetadata} transformation has changed even though the
10+
* reference
1011
* has not changed.
1112
*
1213
* The wrapped value will be unwrapped by change detection, and the unwrapped value will be stored.

modules/angular2/src/core/annotations/annotations.dart

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)