From 1513e201bb04e45f234b2beeeee4d48b2e032ef0 Mon Sep 17 00:00:00 2001 From: Wassim Chegham Date: Thu, 18 Feb 2016 22:54:53 +0100 Subject: [PATCH] docs(ContentChild): add example with refs Add missing example on how ContentChild works with refs Closes #7160 Closes #7162 --- modules/@angular/core/src/metadata.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/@angular/core/src/metadata.ts b/modules/@angular/core/src/metadata.ts index d6568b650f..bda0ec4da9 100644 --- a/modules/@angular/core/src/metadata.ts +++ b/modules/@angular/core/src/metadata.ts @@ -1089,12 +1089,21 @@ export var ContentChildren: ContentChildrenMetadataFactory = * }) * class SomeDir { * @ContentChild(ChildDirective) contentChild; + * @ContentChild('container_ref') containerChild * * ngAfterContentInit() { * // contentChild is set + * // containerChild is set * } * } * ``` + * + * ```html + * + * a + * b + * + * ``` */ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(ContentChildMetadata);