diff --git a/public/docs/js/latest/api/annotations/ComponentAnnotation-class.jade b/public/docs/js/latest/api/annotations/ComponentAnnotation-class.jade index a667a0539a..38f123e16c 100644 --- a/public/docs/js/latest/api/annotations/ComponentAnnotation-class.jade +++ b/public/docs/js/latest/api/annotations/ComponentAnnotation-class.jade @@ -1,7 +1,7 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations_impl/annotations.ts (line 778) + defined in angular2/src/core/annotations_impl/annotations.ts (line 776) :markdown Declare reusable UI building blocks for an application. diff --git a/public/docs/js/latest/api/annotations/DirectiveAnnotation-class.jade b/public/docs/js/latest/api/annotations/DirectiveAnnotation-class.jade index a01c14c16e..9f004bc380 100644 --- a/public/docs/js/latest/api/annotations/DirectiveAnnotation-class.jade +++ b/public/docs/js/latest/api/annotations/DirectiveAnnotation-class.jade @@ -1,7 +1,7 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations_impl/annotations.ts (line 4) + defined in angular2/src/core/annotations_impl/annotations.ts (line 4) :markdown Directives allow you to attach behavior to elements in the DOM. @@ -211,11 +211,10 @@ p.location-badge. A directive can also query for other child directives. Since parent directives are instantiated - before child - directives, a directive can't simply inject the list of child directives. Instead, the directive - injects a QueryList, which updates its contents as children are added, removed, or moved - by a directive - that uses a ViewContainerRef such as a `for`, an `if`, or a `switch`. + before child directives, a directive can't simply inject the list of child directives. Instead, + the directive injects a QueryList, which updates its contents as children are added, + removed, or moved by a directive that uses a ViewContainerRef such as a `ng-for`, an + `ng-if`, or an `ng-switch`. ``` @Directive({ selector: '[my-directive]' }) @@ -226,8 +225,7 @@ p.location-badge. ``` This directive would be instantiated with a QueryList which contains `Dependency` 4 and - 6. Here, `Dependency` - 5 would not be included, because it is not a direct child. + 6. Here, `Dependency` 5 would not be included, because it is not a direct child. ### Injecting a live collection of descendant directives @@ -704,7 +702,8 @@ p.location-badge. Specifies a set of lifecycle hostListeners in which the directive participates. - See onChange, onDestroy, onAllChangesDone for details. + See onChange, onDestroy, + onAllChangesDone for details. diff --git a/public/docs/js/latest/api/annotations/onAllChangesDone-const.jade b/public/docs/js/latest/api/annotations/onAllChangesDone-const.jade index bfba9c6e6f..de3c78f7fb 100644 --- a/public/docs/js/latest/api/annotations/onAllChangesDone-const.jade +++ b/public/docs/js/latest/api/annotations/onAllChangesDone-const.jade @@ -1,20 +1,24 @@ -

onAllChangesDone

-

(const)

-
-

Notify a directive when the bindings of all its children have been changed.

.l-main-section - h2 Example: -pre(class="prettyprint linenums") - code. -@Directive({ - selector: '[class-set]', - lifecycle: [onAllChangesDone] -}) -class ClassSet { + h2 onAllChangesDone variable + p.location-badge. + exported from angular2/annotations - onAllChangesDone() { - } + :markdown + Notify a directive when the bindings of all its children have been changed. + + ## Example: + + ``` + @Directive({ + selector: '[class-set]', + lifecycle: [onAllChangesDone] + }) + class ClassSet { + + onAllChangesDone() { + } + + } + ``` -} -
diff --git a/public/docs/js/latest/api/annotations/onChange-const.jade b/public/docs/js/latest/api/annotations/onChange-const.jade index ca7b2a3e86..28fb6cc02e 100644 --- a/public/docs/js/latest/api/annotations/onChange-const.jade +++ b/public/docs/js/latest/api/annotations/onChange-const.jade @@ -1,34 +1,40 @@ -

onChange

-

(const)

-
-

Notify a directive when any of its bindings have changed.

-

This method is called right after the directive's bindings have been checked, -and before any of its children's bindings have been checked.

-

It is invoked only if at least one of the directive's bindings has changed.

.l-main-section - h2 Example: -pre(class="prettyprint linenums") - code. -@Directive({ - selector: '[class-set]', - properties: [ - 'propA', - 'propB' - ], - lifecycle: [onChange] -}) -class ClassSet { - propA; - propB; - onChange(changes:{[idx: string, PropertyUpdate]}) { - // This will get called after any of the properties have been updated. - if (changes['propA']) { - // if propA was updated + h2 onChange variable + p.location-badge. + exported from angular2/annotations + + :markdown + Notify a directive when any of its bindings have changed. + + This method is called right after the directive's bindings have been checked, + and before any of its children's bindings have been checked. + + It is invoked only if at least one of the directive's bindings has changed. + + ## Example: + + ``` + @Directive({ + selector: '[class-set]', + properties: [ + 'propA', + 'propB' + ], + lifecycle: [onChange] + }) + class ClassSet { + propA; + propB; + onChange(changes:{[idx: string, PropertyUpdate]}) { + // This will get called after any of the properties have been updated. + if (changes['propA']) { + // if propA was updated + } + if (changes['propA']) { + // if propB was updated + } + } } - if (changes['propA']) { - // if propB was updated - } - } -} -
+ ``` + diff --git a/public/docs/js/latest/api/annotations/onCheck-const.jade b/public/docs/js/latest/api/annotations/onCheck-const.jade index 2c708281bb..77762c0838 100644 --- a/public/docs/js/latest/api/annotations/onCheck-const.jade +++ b/public/docs/js/latest/api/annotations/onCheck-const.jade @@ -1,21 +1,27 @@ -

onCheck

-

(const)

-
-

Notify a directive when it has been checked.

-

This method is called right after the directive's bindings have been checked, -and before any of its children's bindings have been checked.

-

It is invoked every time even when none of the directive's bindings has changed.

.l-main-section - h2 Example: -pre(class="prettyprint linenums") - code. -@Directive({ - selector: '[class-set]', - lifecycle: [onCheck] -}) -class ClassSet { - onCheck() { - } -} -
+ h2 onCheck variable + p.location-badge. + exported from angular2/annotations + + :markdown + Notify a directive when it has been checked. + + This method is called right after the directive's bindings have been checked, + and before any of its children's bindings have been checked. + + It is invoked every time even when none of the directive's bindings has changed. + + ## Example: + + ``` + @Directive({ + selector: '[class-set]', + lifecycle: [onCheck] + }) + class ClassSet { + onCheck() { + } + } + ``` + diff --git a/public/docs/js/latest/api/annotations/onDestroy-const.jade b/public/docs/js/latest/api/annotations/onDestroy-const.jade index 9853397bf1..effff17f37 100644 --- a/public/docs/js/latest/api/annotations/onDestroy-const.jade +++ b/public/docs/js/latest/api/annotations/onDestroy-const.jade @@ -1,19 +1,23 @@ -

onDestroy

-

(const)

-
-

Notify a directive whenever a View that contains it is destroyed.

.l-main-section - h2 Example -pre(class="prettyprint linenums") - code. -@Directive({ - ..., - lifecycle: [onDestroy] -}) -class ClassSet { - onDestroy() { - // invoked to notify directive of the containing view destruction. - } -} -
+ h2 onDestroy variable + p.location-badge. + exported from angular2/annotations + + :markdown + Notify a directive whenever a View that contains it is destroyed. + + ## Example + + ``` + @Directive({ + ..., + lifecycle: [onDestroy] + }) + class ClassSet { + onDestroy() { + // invoked to notify directive of the containing view destruction. + } + } + ``` + diff --git a/public/docs/js/latest/api/annotations/onInit-const.jade b/public/docs/js/latest/api/annotations/onInit-const.jade index d93d412c5d..f0cae9ab98 100644 --- a/public/docs/js/latest/api/annotations/onInit-const.jade +++ b/public/docs/js/latest/api/annotations/onInit-const.jade @@ -1,21 +1,27 @@ -

onInit

-

(const)

-
-

Notify a directive when it has been checked the first itme.

-

This method is called right after the directive's bindings have been checked, -and before any of its children's bindings have been checked.

-

It is invoked only once.

.l-main-section - h2 Example: -pre(class="prettyprint linenums") - code. -@Directive({ - selector: '[class-set]', - lifecycle: [onInit] -}) -class ClassSet { - onInit() { - } -} -
+ h2 onInit variable + p.location-badge. + exported from angular2/annotations + + :markdown + Notify a directive when it has been checked the first itme. + + This method is called right after the directive's bindings have been checked, + and before any of its children's bindings have been checked. + + It is invoked only once. + + ## Example: + + ``` + @Directive({ + selector: '[class-set]', + lifecycle: [onInit] + }) + class ClassSet { + onInit() { + } + } + ``` + diff --git a/public/docs/js/latest/api/change_detection/CHECKED-const.jade b/public/docs/js/latest/api/change_detection/CHECKED-const.jade index 6161c63c99..783b7e80c9 100644 --- a/public/docs/js/latest/api/change_detection/CHECKED-const.jade +++ b/public/docs/js/latest/api/change_detection/CHECKED-const.jade @@ -1,8 +1,12 @@ -

CHECKED

-

(const)

-
-

CHECKED means that the change detector should be skipped until its mode changes to -CHECK_ONCE or CHECK_ALWAYS.

+.l-main-section + h2 CHECKED variable + p.location-badge. + exported from angular2/change_detection + + :markdown + CHECKED means that the change detector should be skipped until its mode changes to + CHECK_ONCE or CHECK_ALWAYS. + + -
diff --git a/public/docs/js/latest/api/change_detection/CHECK_ALWAYS-const.jade b/public/docs/js/latest/api/change_detection/CHECK_ALWAYS-const.jade index 861c03eb91..4644fd1b06 100644 --- a/public/docs/js/latest/api/change_detection/CHECK_ALWAYS-const.jade +++ b/public/docs/js/latest/api/change_detection/CHECK_ALWAYS-const.jade @@ -1,8 +1,12 @@ -

CHECK_ALWAYS

-

(const)

-
-

CHECK_ALWAYS means that after calling detectChanges the mode of the change detector -will remain CHECK_ALWAYS.

+.l-main-section + h2 CHECK_ALWAYS variable + p.location-badge. + exported from angular2/change_detection + + :markdown + CHECK_ALWAYS means that after calling detectChanges the mode of the change detector + will remain CHECK_ALWAYS. + + -
diff --git a/public/docs/js/latest/api/change_detection/CHECK_ONCE-const.jade b/public/docs/js/latest/api/change_detection/CHECK_ONCE-const.jade index 12ed7c88c0..3f87294584 100644 --- a/public/docs/js/latest/api/change_detection/CHECK_ONCE-const.jade +++ b/public/docs/js/latest/api/change_detection/CHECK_ONCE-const.jade @@ -1,8 +1,12 @@ -

CHECK_ONCE

-

(const)

-
-

CHECK_ONCE means that after calling detectChanges the mode of the change detector -will become CHECKED.

+.l-main-section + h2 CHECK_ONCE variable + p.location-badge. + exported from angular2/change_detection + + :markdown + CHECK_ONCE means that after calling detectChanges the mode of the change detector + will become CHECKED. + + -
diff --git a/public/docs/js/latest/api/change_detection/DEFAULT-const.jade b/public/docs/js/latest/api/change_detection/DEFAULT-const.jade index 94c8d69e2a..bf821ed7c2 100644 --- a/public/docs/js/latest/api/change_detection/DEFAULT-const.jade +++ b/public/docs/js/latest/api/change_detection/DEFAULT-const.jade @@ -1,7 +1,11 @@ -

DEFAULT

-

(const)

-
-

DEFAULT means that the change detector's mode will be set to CHECK_ALWAYS during hydration.

+.l-main-section + h2 DEFAULT variable + p.location-badge. + exported from angular2/change_detection + + :markdown + DEFAULT means that the change detector's mode will be set to CHECK_ALWAYS during hydration. + + -
diff --git a/public/docs/js/latest/api/change_detection/DETACHED-const.jade b/public/docs/js/latest/api/change_detection/DETACHED-const.jade index 5ed75f35f0..dc0eb8da5d 100644 --- a/public/docs/js/latest/api/change_detection/DETACHED-const.jade +++ b/public/docs/js/latest/api/change_detection/DETACHED-const.jade @@ -1,8 +1,12 @@ -

DETACHED

-

(const)

-
-

DETACHED means that the change detector sub tree is not a part of the main tree and -should be skipped.

+.l-main-section + h2 DETACHED variable + p.location-badge. + exported from angular2/change_detection + + :markdown + DETACHED means that the change detector sub tree is not a part of the main tree and + should be skipped. + + -
diff --git a/public/docs/js/latest/api/change_detection/ON_PUSH-const.jade b/public/docs/js/latest/api/change_detection/ON_PUSH-const.jade index 431bd629d8..0a4757abc9 100644 --- a/public/docs/js/latest/api/change_detection/ON_PUSH-const.jade +++ b/public/docs/js/latest/api/change_detection/ON_PUSH-const.jade @@ -1,7 +1,11 @@ -

ON_PUSH

-

(const)

-
-

ON_PUSH means that the change detector's mode will be set to CHECK_ONCE during hydration.

+.l-main-section + h2 ON_PUSH variable + p.location-badge. + exported from angular2/change_detection + + :markdown + ON_PUSH means that the change detector's mode will be set to CHECK_ONCE during hydration. + + -
diff --git a/public/docs/js/latest/api/directives/NgIf-class.jade b/public/docs/js/latest/api/directives/NgIf-class.jade index 87ba530c5d..d064f10ee0 100644 --- a/public/docs/js/latest/api/directives/NgIf-class.jade +++ b/public/docs/js/latest/api/directives/NgIf-class.jade @@ -1,14 +1,13 @@ p.location-badge. exported from angular2/directives - defined in angular2/src/directives/ng_if.ts (line 3) + defined in angular2/src/directives/ng_if.ts (line 3) :markdown Removes or recreates a portion of the DOM tree based on an {expression}. - If the expression assigned to `if` evaluates to a false value then the element is removed from - the - DOM, otherwise a clone of the element is reinserted into the DOM. + If the expression assigned to `ng-if` evaluates to a false value then the element + is removed from the DOM, otherwise a clone of the element is reinserted into the DOM. # Example: diff --git a/public/docs/js/latest/api/directives/NgSwitchDefault-class.jade b/public/docs/js/latest/api/directives/NgSwitchDefault-class.jade index 6e10e614d7..8e974f203a 100644 --- a/public/docs/js/latest/api/directives/NgSwitchDefault-class.jade +++ b/public/docs/js/latest/api/directives/NgSwitchDefault-class.jade @@ -6,7 +6,7 @@ p.location-badge. :markdown Defines a default case statement. - Default case statements are displayed when no `NgSwitchWhen` match the `switch` value. + Default case statements are displayed when no `NgSwitchWhen` match the `ng-switch` value. Example: diff --git a/public/docs/js/latest/api/directives/coreDirectives-const.jade b/public/docs/js/latest/api/directives/coreDirectives-const.jade index 07b4d173a2..2f1ea4bb00 100644 --- a/public/docs/js/latest/api/directives/coreDirectives-const.jade +++ b/public/docs/js/latest/api/directives/coreDirectives-const.jade @@ -1,40 +1,49 @@ -

coreDirectives

-

(const)

-
-

A collection of the Angular core directives that are likely to be used in each and every Angular -application.

-

This collection can be used to quickly enumerate all the built-in directives in the @View -annotation. For example, -instead of writing:

-pre(class="prettyprint linenums") - code. -import {If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2'; -import {OtherDirective} from 'myDirectives'; +.l-main-section + h2 coreDirectives variable + p.location-badge. + exported from angular2/directives -@Component({ - selector: 'my-component' -}) -@View({ - templateUrl: 'myComponent.html', - directives: [If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective] -}) -export class MyComponent { - ... -}

one could enumerate all the core directives at once:

-pre(class="prettyprint linenums") - code. -import {coreDirectives} from 'angular2/angular2'; -import {OtherDirective} from 'myDirectives'; + :markdown + A collection of the Angular core directives that are likely to be used in each and every Angular + application. + + This collection can be used to quickly enumerate all the built-in directives in the `@View` + annotation. For example, + instead of writing: + + ``` + import {If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault} from 'angular2/angular2'; + import {OtherDirective} from 'myDirectives'; + + @Component({ + selector: 'my-component' + }) + @View({ + templateUrl: 'myComponent.html', + directives: [If, NgFor, NgSwitch, NgSwitchWhen, NgSwitchDefault, OtherDirective] + }) + export class MyComponent { + ... + } + ``` + one could enumerate all the core directives at once: + + ``` + import {coreDirectives} from 'angular2/angular2'; + import {OtherDirective} from 'myDirectives'; + + @Component({ + selector: 'my-component' + }) + @View({ + templateUrl: 'myComponent.html', + directives: [coreDirectives, OtherDirective] + }) + export class MyComponent { + ... + } + ``` + + -@Component({ - selector: 'my-component' -}) -@View({ - templateUrl: 'myComponent.html', - directives: [coreDirectives, OtherDirective] -}) -export class MyComponent { - ... -} -
diff --git a/public/docs/js/latest/api/forms/INVALID-const.jade b/public/docs/js/latest/api/forms/INVALID-const.jade index 52d5d0f6fe..526e2c685e 100644 --- a/public/docs/js/latest/api/forms/INVALID-const.jade +++ b/public/docs/js/latest/api/forms/INVALID-const.jade @@ -1,7 +1,10 @@ -

INVALID

-

(const)

-
-

Indicates that a Control is invalid, i.e. that an error exists in the input value.

+.l-main-section + h2 INVALID variable + p.location-badge. + exported from angular2/forms + + :markdown + Indicates that a Control is invalid, i.e. that an error exists in the input value. + -
diff --git a/public/docs/js/latest/api/forms/VALID-const.jade b/public/docs/js/latest/api/forms/VALID-const.jade index 3cceda55b5..7d78b82d3e 100644 --- a/public/docs/js/latest/api/forms/VALID-const.jade +++ b/public/docs/js/latest/api/forms/VALID-const.jade @@ -1,7 +1,10 @@ -

VALID

-

(const)

-
-

Indicates that a Control is valid, i.e. that no errors exist in the input value.

+.l-main-section + h2 VALID variable + p.location-badge. + exported from angular2/forms + + :markdown + Indicates that a Control is valid, i.e. that no errors exist in the input value. + -
diff --git a/public/docs/js/latest/api/forms/formDirectives-const.jade b/public/docs/js/latest/api/forms/formDirectives-const.jade index a7999085fa..c219e08e62 100644 --- a/public/docs/js/latest/api/forms/formDirectives-const.jade +++ b/public/docs/js/latest/api/forms/formDirectives-const.jade @@ -1,8 +1,12 @@ -

formDirectives

-

(const)

-
-

A list of all the form directives used as part of a @View annotation.

-

This is a shorthand for importing them each individually.

+.l-main-section + h2 formDirectives variable + p.location-badge. + exported from angular2/forms + + :markdown + A list of all the form directives used as part of a `@View` annotation. + + This is a shorthand for importing them each individually. + -
diff --git a/public/docs/js/latest/api/router/routerDirectives-const.jade b/public/docs/js/latest/api/router/routerDirectives-const.jade index ed5f777265..94e8e597b8 100644 --- a/public/docs/js/latest/api/router/routerDirectives-const.jade +++ b/public/docs/js/latest/api/router/routerDirectives-const.jade @@ -1,6 +1,10 @@ -

routerDirectives

-

(const)

-
+.l-main-section + h2 routerDirectives variable + p.location-badge. + exported from angular2/router + + :markdown + + -