Skip to content

Commit e295940

Browse files
committed
cleanup(docs): Edited API docs
1 parent 2ed7622 commit e295940

17 files changed

Lines changed: 197 additions & 22 deletions

File tree

modules/angular2/angular2.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
/**
2-
* @module
3-
* @public
4-
* @description
5-
* Define public API for Angular here.
6-
*/
71
export * from './change_detection';
82
export * from './core';
93
export * from './annotations';

modules/angular2/annotations.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
* @module
33
* @public
44
* @description
5-
* Define public API for Angular here.
5+
*
6+
* Annotations provide the additional information that Angular requires in order to run your application. This module
7+
* contains [Component], [Decorator], and [View] annotations, as well as [Parent] and [Ancestor] annotations that are
8+
* used by Angular to resolve dependencies.
9+
*
610
*/
711
export * from './src/core/annotations/annotations';

modules/angular2/core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/**
2+
* @module
3+
* @public
4+
* @description
5+
* Define public API for Angular here.
6+
*/
17
export * from './src/core/annotations/visibility';
28
export * from './src/core/compiler/interfaces';
39
export * from './src/core/annotations/view';

modules/angular2/forms.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
* @module
33
* @public
44
* @description
5-
* Describe the forms module here
5+
* This module is used for handling complex input, by defining and building a [FormObject] that consists of [Control]
6+
* objects, and mapping them onto the DOM. [Control] objects can then be used to read information from the form DOM
7+
* elements.
8+
*
69
*/
710

811
export * from './src/forms/model';
912
export * from './src/forms/directives';
1013
export * from './src/forms/validators';
1114
export * from './src/forms/validator_directives';
12-
export * from './src/forms/form_builder';
15+
export * from './src/forms/form_builder';

modules/angular2/pipes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
* @module
33
* @public
44
* @description
5-
* Define public API for Angular here.
5+
* This module provides advanced support for extending change detection.
66
*/
Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,37 @@
1+
/**
2+
* Indicates that the result of a [Pipe] transformation has not changed since the last time the pipe was called.
3+
*
4+
* Suppose we have a pipe that computes changes in an array by performing a simple diff operation. If
5+
* we call this pipe with the same array twice, it will return `NO_CHANGE` the second time.
6+
*
7+
* @exportedAs angular2/pipes
8+
*/
9+
110
export var NO_CHANGE = new Object();
211

312
/**
4-
* @exportedAs angular2/angular2
13+
* An interface for extending the list of pipes known to Angular.
14+
*
15+
* If you are writing a custom [Pipe], you must extend this interface.
16+
*
17+
* #Example
18+
*
19+
* ```
20+
* class DoublePipe extends Pipe {
21+
* supports(obj) {
22+
* return true;
23+
* }
24+
*
25+
* transform(value) {
26+
* return `${value}${value}`;
27+
* }
28+
* }
29+
* ```
30+
*
31+
* @exportedAs angular2/pipes
532
*/
633
export class Pipe {
734
supports(obj):boolean {return false;}
835
onDestroy() {}
936
transform(value:any):any {return null;}
10-
}
37+
}

modules/angular2/src/core/annotations/annotations.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ export class DynamicComponent extends Directive {
702702
* In our HTML template, we can then add this behavior to a `<div>` or any other element with the `tooltip` selector,
703703
* like so:
704704
*
705-
* ```
705+
* ```
706706
* <div tooltip="some text here"></div>
707707
* ```
708708
*

modules/angular2/src/core/annotations/view.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import {ABSTRACT, CONST, Type} from 'angular2/src/facade/lang';
1818
* selector: 'greet'
1919
* })
2020
* @View({
21-
* template: 'Hello {{name}}!'
21+
* template: 'Hello {{name}}!',
22+
* directives: [GreetUser, Bold]
2223
* })
2324
* class Greet {
2425
* name: string;

modules/angular2/src/core/application.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ function _createVmZone(givenReporter:Function): VmTurnZone {
240240
*
241241
* Returns a [Promise] with the application`s private [Injector].
242242
*
243-
* @exportedAs angular2/angular2
243+
* @exportedAs angular2/core
244244
*/
245245
export function bootstrap(appComponentType: Type,
246246
componentInjectableBindings: List<Binding> = null,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {DirectDomViewRef} from 'angular2/src/render/dom/direct_dom_renderer';
99
* Attention: NgElement will be replaced by a different concept
1010
* for accessing an element in a way that is compatible with the render layer.
1111
*
12-
* @exportedAs angular2/angular2
12+
* @exportedAs angular2/core
1313
*/
1414
export class NgElement {
1515
_view:viewModule.AppView;

0 commit comments

Comments
 (0)