Skip to content

Commit 86dc3e5

Browse files
committed
docs: create public API surface
Closes angular#1181
1 parent c1aa652 commit 86dc3e5

23 files changed

+115
-10
lines changed

modules/angular2/change_detection.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ export var defaultPipes = {
3939
]
4040
};
4141

42+
43+
/**
44+
* @publicModule angular2/change_detection
45+
*/
4246
export class DynamicChangeDetection extends ChangeDetection {
4347
registry:PipeRegistry;
4448

@@ -52,6 +56,9 @@ export class DynamicChangeDetection extends ChangeDetection {
5256
}
5357
}
5458

59+
/**
60+
* @publicModule angular2/change_detection
61+
*/
5562
export class JitChangeDetection extends ChangeDetection {
5663
registry:PipeRegistry;
5764

modules/angular2/pipes.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/**
2+
* Define public API for Angular here.
3+
*/

modules/angular2/src/change_detection/binding_propagation_config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {ChangeDetector} from './interfaces';
22
import {CHECK_ONCE, DETACHED, CHECK_ALWAYS} from './constants';
33

44
/**
5-
* @publicModule angular2/angular2
5+
* @publicModule angular2/change_detection
66
*/
77
export class BindingPropagationConfig {
88
_cd:ChangeDetector;

modules/angular2/src/change_detection/pipes/iterable_changes.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export class IterableChangesFactory {
2626
}
2727
}
2828

29+
/**
30+
* @publicModule angular2/pipes
31+
*/
2932
export class IterableChanges extends Pipe {
3033
_collection;
3134
_length:int;
@@ -501,6 +504,9 @@ export class IterableChanges extends Pipe {
501504
}
502505
}
503506

507+
/**
508+
* @publicModule angular2/pipes
509+
*/
504510
export class CollectionChangeRecord {
505511
currentIndex:int;
506512
previousIndex:int;

modules/angular2/src/change_detection/pipes/keyvalue_changes.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import {stringify, looseIdentical, isJsObject} from 'angular2/src/facade/lang';
33

44
import {NO_CHANGE, Pipe} from './pipe';
55

6+
/**
7+
* @publicModule angular2/pipes
8+
*/
69
export class KeyValueChangesFactory {
710
supports(obj):boolean {
811
return KeyValueChanges.supportsObj(obj);
@@ -13,6 +16,9 @@ export class KeyValueChangesFactory {
1316
}
1417
}
1518

19+
/**
20+
* @publicModule angular2/pipes
21+
*/
1622
export class KeyValueChanges extends Pipe {
1723
_records:Map;
1824

@@ -349,6 +355,9 @@ export class KeyValueChanges extends Pipe {
349355

350356

351357

358+
/**
359+
* @publicModule angular2/pipes
360+
*/
352361
export class KVChangeRecord {
353362
key;
354363
previousValue;

modules/angular2/src/change_detection/pipes/null_pipe.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import {isBlank} from 'angular2/src/facade/lang';
22
import {Pipe, NO_CHANGE} from './pipe';
33

4+
/**
5+
* @publicModule angular2/pipes
6+
*/
47
export class NullPipeFactory {
58
supports(obj):boolean {
69
return NullPipe.supportsObj(obj);
@@ -11,6 +14,9 @@ export class NullPipeFactory {
1114
}
1215
}
1316

17+
/**
18+
* @publicModule angular2/pipes
19+
*/
1420
export class NullPipe extends Pipe {
1521
called:boolean;
1622
constructor() {

modules/angular2/src/change_detection/pipes/pipe.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
export var NO_CHANGE = new Object();
22

3+
/**
4+
* @publicModule angular2/angular2
5+
*/
36
export class Pipe {
47
supports(obj):boolean {return false;}
58
onDestroy() {}

modules/angular2/src/core/compiler/compiler.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ import {CssProcessor} from './css_processor';
2222
/**
2323
* Cache that stores the ProtoView of the template of a component.
2424
* Used to prevent duplicate work and resolve cyclic dependencies.
25-
* @publicModule angular2/angular2
2625
*/
2726
@Injectable()
2827
export class CompilerCache {
@@ -49,7 +48,8 @@ export class CompilerCache {
4948
* The compiler loads and translates the html templates of components into
5049
* nested ProtoViews. To decompose its functionality it uses
5150
* the CompilePipeline and the CompileSteps.
52-
* @publicModule angular2/angular2
51+
*
52+
* @publicModule angular2/template
5353
*/
5454
@Injectable()
5555
export class Compiler {
@@ -90,6 +90,7 @@ export class Compiler {
9090
this._cssProcessor = cssProcessor;
9191
}
9292

93+
// todo(misko): should be private method
9394
createSteps(component:Type, template: Template):List<CompileStep> {
9495
var dirMetadata = ListWrapper.map(this._flattenDirectives(template),
9596
(d) => this._reader.read(d));

modules/angular2/src/core/compiler/shadow_dom_strategy.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ function _emptyStep() {
3030
return _EMPTY_STEP;
3131
}
3232

33+
/**
34+
* @publicModule angular2/template
35+
*/
3336
export class ShadowDomStrategy {
3437
attachTemplate(el, view:viewModule.View) {}
3538
constructLightDom(lightDomView:viewModule.View, shadowDomView:viewModule.View, el): LightDom { return null; }
@@ -77,6 +80,8 @@ export class ShadowDomStrategy {
7780
* Notes:
7881
* - styles are **not** scoped to their component and will apply to the whole document,
7982
* - you can **not** use shadow DOM specific selectors in the styles
83+
*
84+
* @publicModule angular2/template
8085
*/
8186
@Injectable()
8287
export class EmulatedUnscopedShadowDomStrategy extends ShadowDomStrategy {
@@ -119,6 +124,8 @@ export class EmulatedUnscopedShadowDomStrategy extends ShadowDomStrategy {
119124
* - styles are scoped to their component and will apply only to it,
120125
* - a common subset of shadow DOM selectors are supported,
121126
* - see `ShadowCss` for more information and limitations.
127+
*
128+
* @publicModule angular2/template
122129
*/
123130
@Injectable()
124131
export class EmulatedScopedShadowDomStrategy extends EmulatedUnscopedShadowDomStrategy {

modules/angular2/src/core/compiler/template_loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {UrlResolver} from 'angular2/src/services/url_resolver';
1111

1212
/**
1313
* Strategy to load component templates.
14-
* @publicModule angular2/angular2
14+
* @publicModule angular2/template
1515
*/
1616
@Injectable()
1717
export class TemplateLoader {

0 commit comments

Comments
 (0)