From 916d5a154f974e1e9b294e8dc4061e829b2dbcc8 Mon Sep 17 00:00:00 2001 From: Alex Wolfe Date: Tue, 28 Apr 2015 06:22:25 -0700 Subject: [PATCH] router api docs --- .../api/annotations/Attribute-class.jade | 2 +- .../api/annotations/Component-class.jade | 20 +- .../api/annotations/Decorator-class.jade | 4 +- .../api/annotations/Directive-class.jade | 38 ++- .../annotations/DynamicComponent-class.jade | 20 +- .../latest/api/annotations/Query-class.jade | 2 +- .../js/latest/api/annotations/View-class.jade | 4 +- .../api/annotations/Viewport-class.jade | 21 +- .../docs/js/latest/api/annotations/_data.json | 4 - .../ChangeDetection-class.jade | 2 +- .../DynamicChangeDetection-class.jade | 5 +- .../JitChangeDetection-class.jade | 5 +- public/docs/js/latest/api/core/_data.json | 3 +- public/docs/js/latest/api/di/Key-class.jade | 22 +- .../js/latest/api/directives/For-class.jade | 2 +- .../js/latest/api/directives/If-class.jade | 2 +- .../api/directives/SwitchDefault-class.jade | 2 +- .../api/directives/SwitchWhen-class.jade | 2 +- .../CheckboxControlValueAccessor-class.jade | 15 +- .../api/forms/ControlDirective-class.jade | 2 +- .../forms/ControlGroupDirective-class.jade | 2 +- .../api/forms/DefaultValueAccessor-class.jade | 15 +- .../js/latest/api/router/Router-class.jade | 253 ++++++++++++++++++ .../latest/api/router/RouterLink-class.jade | 84 ++++++ public/docs/js/latest/api/router/_data.json | 14 + public/docs/js/latest/api/router/index.jade | 8 + .../js/latest/api/test/TestBed-class.jade | 2 +- .../latest/api/view/ComponentRef-class.jade | 2 +- .../view/DynamicComponentLoader-class.jade | 10 +- .../js/latest/api/view/ElementRef-class.jade | 4 +- .../js/latest/api/view/QueryList-class.jade | 6 +- .../api/view/ViewContainerRef-class.jade | 139 ++++++++++ public/docs/js/latest/api/view/_data.json | 4 +- 33 files changed, 641 insertions(+), 79 deletions(-) create mode 100644 public/docs/js/latest/api/router/Router-class.jade create mode 100644 public/docs/js/latest/api/router/RouterLink-class.jade create mode 100644 public/docs/js/latest/api/router/_data.json create mode 100644 public/docs/js/latest/api/router/index.jade create mode 100644 public/docs/js/latest/api/view/ViewContainerRef-class.jade diff --git a/public/docs/js/latest/api/annotations/Attribute-class.jade b/public/docs/js/latest/api/annotations/Attribute-class.jade index 0cd66c3bc2..7c58ac6f61 100644 --- a/public/docs/js/latest/api/annotations/Attribute-class.jade +++ b/public/docs/js/latest/api/annotations/Attribute-class.jade @@ -1,7 +1,7 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations/di.js (line 53) + defined in angular2/src/core/annotations/di.js (line 31) :markdown Specifies that a constant attribute value should be injected. diff --git a/public/docs/js/latest/api/annotations/Component-class.jade b/public/docs/js/latest/api/annotations/Component-class.jade index c917f38a5a..a07946ea59 100644 --- a/public/docs/js/latest/api/annotations/Component-class.jade +++ b/public/docs/js/latest/api/annotations/Component-class.jade @@ -1,7 +1,7 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations/annotations.js (line 521) + defined in angular2/src/core/annotations/annotations.js (line 547) :markdown Declare reusable UI building blocks for an application. @@ -45,18 +45,20 @@ p.location-badge. pre.prettyprint code. constructor({ - selector, - properties, - events, - hostListeners, - injectables, - lifecycle, - changeDetection = DEFAULT + selector, + properties, + events, + hostListeners, + hostProperties, + injectables, + lifecycle, + changeDetection = DEFAULT }:{ selector:string, properties:Object, events:List, - hostListeners:Object, + hostListeners:any, + hostProperties:any, injectables:List, lifecycle:List, changeDetection:string diff --git a/public/docs/js/latest/api/annotations/Decorator-class.jade b/public/docs/js/latest/api/annotations/Decorator-class.jade index daa0783e70..39a879cb36 100644 --- a/public/docs/js/latest/api/annotations/Decorator-class.jade +++ b/public/docs/js/latest/api/annotations/Decorator-class.jade @@ -1,7 +1,7 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations/annotations.js (line 755) + defined in angular2/src/core/annotations/annotations.js (line 787) :markdown Directive that attaches behavior to DOM elements. @@ -74,6 +74,7 @@ p.location-badge. properties, events, hostListeners, + hostProperties, lifecycle, compileChildren = true, }:{ @@ -81,6 +82,7 @@ p.location-badge. properties:any, events:List, hostListeners:any, + hostProperties:any, lifecycle:List, compileChildren:boolean }={}) diff --git a/public/docs/js/latest/api/annotations/Directive-class.jade b/public/docs/js/latest/api/annotations/Directive-class.jade index e938e3f6f1..872cdf526d 100644 --- a/public/docs/js/latest/api/annotations/Directive-class.jade +++ b/public/docs/js/latest/api/annotations/Directive-class.jade @@ -53,7 +53,7 @@ p.location-badge. To inject element-specific special objects, declare the constructor parameter as: - `element: NgElement` to obtain a DOM element (DEPRECATED: replacement coming) - - `viewContainer: ViewContainer` to control child template instantiation, for Viewport directives only + - `viewContainer: ViewContainerRef` to control child template instantiation, for Viewport directives only - `bindingPropagation: BindingPropagation` to control change detection in a more granular way. ## Example @@ -185,8 +185,8 @@ 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 any + 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 any Viewport directive such as a `for`, an `if`, or a `switch`. ``` @@ -197,7 +197,7 @@ p.location-badge. } ``` - This directive would be instantiated with a QueryList which contains `Dependency` 4 and 6. Here, `Dependency` + 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. ### Injecting a live collection of descendant directives @@ -246,12 +246,14 @@ p.location-badge. properties, events, hostListeners, + hostProperties, lifecycle }:{ selector:string, properties:any, events:List, hostListeners: any, + hostProperties: any, lifecycle:List }={}) @@ -369,6 +371,34 @@ p.location-badge. + .l-sub-section + h3 hostProperties + + + :markdown + Specifies which DOM properties a directives updates. + + ## Syntax + + ``` + @Decorator({ + selector: 'input', + hostProperties: { + 'value': 'value' + } + }) + class InputDecorator { + value:string; + } + + In this example every time the value property of the decorator changes, Angular will update the value property of + the host element. + ``` + + + + + .l-sub-section h3 lifecycle diff --git a/public/docs/js/latest/api/annotations/DynamicComponent-class.jade b/public/docs/js/latest/api/annotations/DynamicComponent-class.jade index 6dae2a59da..c98c9f6ff4 100644 --- a/public/docs/js/latest/api/annotations/DynamicComponent-class.jade +++ b/public/docs/js/latest/api/annotations/DynamicComponent-class.jade @@ -1,7 +1,7 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations/annotations.js (line 660) + defined in angular2/src/core/annotations/annotations.js (line 689) :markdown Directive used for dynamically loading components. @@ -57,17 +57,19 @@ p.location-badge. pre.prettyprint code. constructor({ - selector, - properties, - events, - hostListeners, - injectables, - lifecycle + selector, + properties, + events, + hostListeners, + hostProperties, + injectables, + lifecycle }:{ selector:string, - properties:Object, + properties:any, events:List, - hostListeners:Object, + hostListeners:any, + hostProperties:any, injectables:List, lifecycle:List }={}) diff --git a/public/docs/js/latest/api/annotations/Query-class.jade b/public/docs/js/latest/api/annotations/Query-class.jade index 1a7fd3457f..b574900646 100644 --- a/public/docs/js/latest/api/annotations/Query-class.jade +++ b/public/docs/js/latest/api/annotations/Query-class.jade @@ -1,7 +1,7 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations/di.js (line 77) + defined in angular2/src/core/annotations/di.js (line 55) :markdown Specifies that a QueryList should be injected. diff --git a/public/docs/js/latest/api/annotations/View-class.jade b/public/docs/js/latest/api/annotations/View-class.jade index 40032f41f6..4b58243c63 100644 --- a/public/docs/js/latest/api/annotations/View-class.jade +++ b/public/docs/js/latest/api/annotations/View-class.jade @@ -108,7 +108,7 @@ p.location-badge. :markdown Specifies an inline template for an angular component. - NOTE: either `templateURL` or `template` should be used, but not both. + NOTE: either `templateUrl` or `template` should be used, but not both. @@ -121,7 +121,7 @@ p.location-badge. :markdown Specifies a template URL for an angular component. - NOTE: either `templateURL` or `template` should be used, but not both. + NOTE: either `templateUrl` or `template` should be used, but not both. diff --git a/public/docs/js/latest/api/annotations/Viewport-class.jade b/public/docs/js/latest/api/annotations/Viewport-class.jade index 32f02bebed..f92ad94fc2 100644 --- a/public/docs/js/latest/api/annotations/Viewport-class.jade +++ b/public/docs/js/latest/api/annotations/Viewport-class.jade @@ -1,13 +1,13 @@ p.location-badge. exported from angular2/annotations - defined in angular2/src/core/annotations/annotations.js (line 884) + defined in angular2/src/core/annotations/annotations.js (line 919) :markdown Directive that controls the instantiation, destruction, and positioning of inline template elements. - A viewport directive uses a ViewContainer to instantiate, insert, move, and destroy views at runtime. - The ViewContainer is created as a result of `