Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(ContentChild, ViewChildren): fix missing docs on angular.io #13656

Merged
merged 1 commit into from
Dec 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
109 changes: 58 additions & 51 deletions modules/@angular/core/src/metadata/di.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,33 @@ export const ContentChildren: ContentChildrenDecorator =
*/
export interface ContentChildDecorator {
/**
* @docsNotRequired
* @whatItDoes Configures a content query.
*
* @howToUse
*
* {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
*
* @description
*
* You can use ContentChild to get the first element or the directive matching the selector from
* the content DOM. If the content DOM changes, and a new child matches the selector,
* the property will be updated.
*
* Content queries are set before the `ngAfterContentInit` callback is called.
*
* **Metadata Properties**:
*
* * **selector** - the directive type or the name used for querying.
* * **read** - read a different token from the queried element.
*
* Let's look at an example:
*
* {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
*
* **npm package**: `@angular/core`
*
* @stable
* @Annotation
*/
(selector: Type<any>|Function|string, {read}?: {read?: any}): any;
new (selector: Type<any>|Function|string, {read}?: {read?: any}): ContentChild;
Expand All @@ -241,30 +267,7 @@ export interface ContentChildDecorator {
export type ContentChild = Query;

/**
* @whatItDoes Configures a content query.
*
* @howToUse
*
* {@example core/di/ts/contentChild/content_child_howto.ts region='HowTo'}
*
* @description
*
* You can use ContentChild to get the first element or the directive matching the selector from the
* content DOM. If the content DOM changes, and a new child matches the selector,
* the property will be updated.
*
* Content queries are set before the `ngAfterContentInit` callback is called.
*
* **Metadata Properties**:
*
* * **selector** - the directive type or the name used for querying.
* * **read** - read a different token from the queried element.
*
* Let's look at an example:
*
* {@example core/di/ts/contentChild/content_child_example.ts region='Component'}
*
* **npm package**: `@angular/core`
* ContentChild decorator and metadata.
*
* @stable
* @Annotation
Expand All @@ -290,8 +293,35 @@ export const ContentChild: ContentChildDecorator = makePropDecorator(
*/
export interface ViewChildrenDecorator {
/**
* @docsNotRequired
*/ (selector: Type<any>|Function|string, {read}?: {read?: any}): any;
* @whatItDoes Configures a view query.
*
* @howToUse
*
* {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
*
* @description
*
* You can use ViewChildren to get the {@link QueryList} of elements or directives from the
* view DOM. Any time a child element is added, removed, or moved, the query list will be updated,
* and the changes observable of the query list will emit a new value.
*
* View queries are set before the `ngAfterViewInit` callback is called.
*
* **Metadata Properties**:
*
* * **selector** - the directive type or the name used for querying.
* * **read** - read a different token from the queried elements.
*
* Let's look at an example:
*
* {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
*
* **npm package**: `@angular/core`
*
* @stable
* @Annotation
*/
(selector: Type<any>|Function|string, {read}?: {read?: any}): any;
new (selector: Type<any>|Function|string, {read}?: {read?: any}): ViewChildren;
}

Expand All @@ -303,30 +333,7 @@ export interface ViewChildrenDecorator {
export type ViewChildren = Query;

/**
* @whatItDoes Configures a view query.
*
* @howToUse
*
* {@example core/di/ts/viewChildren/view_children_howto.ts region='HowTo'}
*
* @description
*
* You can use ViewChildren to get the {@link QueryList} of elements or directives from the
* view DOM. Any time a child element is added, removed, or moved, the query list will be updated,
* and the changes observable of the query list will emit a new value.
*
* View queries are set before the `ngAfterViewInit` callback is called.
*
* **Metadata Properties**:
*
* * **selector** - the directive type or the name used for querying.
* * **read** - read a different token from the queried elements.
*
* Let's look at an example:
*
* {@example core/di/ts/viewChildren/view_children_example.ts region='Component'}
*
* **npm package**: `@angular/core`
* ViewChildren decorator and metadata.
*
* @stable
* @Annotation
Expand Down
5 changes: 3 additions & 2 deletions tools/public_api_guard/core/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export declare const ContentChild: ContentChildDecorator;

/** @stable */
export interface ContentChildDecorator {
(selector: Type<any> | Function | string, {read}?: {
/** @stable */ (selector: Type<any> | Function | string, {read}?: {
read?: any;
}): any;
new (selector: Type<any> | Function | string, {read}?: {
Expand Down Expand Up @@ -979,7 +979,8 @@ export interface ViewChildDecorator {
export declare const ViewChildren: ViewChildrenDecorator;

/** @stable */
export interface ViewChildrenDecorator { (selector: Type<any> | Function | string, {read}?: {
export interface ViewChildrenDecorator {
/** @stable */ (selector: Type<any> | Function | string, {read}?: {
read?: any;
}): any;
new (selector: Type<any> | Function | string, {read}?: {
Expand Down