docs(core): fix examples

This commit is contained in:
vsavkin 2016-09-14 14:12:10 -07:00 committed by Igor Minar
parent 785292f44f
commit 003294d5df
2 changed files with 3 additions and 5 deletions

View File

@ -18,9 +18,7 @@ import {ViewEncapsulation} from './metadata/view';
import {Type} from './type';
import {TypeDecorator, makeParamDecorator, makePropDecorator} from './util/decorators';
export {ANALYZE_FOR_ENTRY_COMPONENTS, Attribute, ContentChild, ContentChildren, Query, ViewChild, ViewChildren,
ContentChildDecorator, ContentChildrenDecorator, ViewChildDecorator, ViewChildrenDecorator
} from './metadata/di';
export {ANALYZE_FOR_ENTRY_COMPONENTS, Attribute, ContentChild, ContentChildDecorator, ContentChildren, ContentChildrenDecorator, Query, ViewChild, ViewChildDecorator, ViewChildren, ViewChildrenDecorator} from './metadata/di';
export {Component, Directive, HostBinding, HostListener, Input, Output, Pipe} from './metadata/directives';
export {AfterContentChecked, AfterContentInit, AfterViewChecked, AfterViewInit, DoCheck, OnChanges, OnDestroy, OnInit} from './metadata/lifecycle_hooks';
export {CUSTOM_ELEMENTS_SCHEMA, ModuleWithProviders, NO_ERRORS_SCHEMA, NgModule, SchemaMetadata} from './metadata/ng_module';

View File

@ -7,7 +7,7 @@
*/
// #docregion HowTo
import {AfterContentInit, Component, ContentChildren, Directive, QueryList} from '@angular/core';
import {AfterContentInit, Component, ContentChild, Directive, QueryList} from '@angular/core';
@Directive({selector: 'child-directive'})
class ChildDirective {
@ -15,7 +15,7 @@ class ChildDirective {
@Directive({selector: 'someDir'})
class SomeDir implements AfterContentInit {
@ContentChild(ChildDirective) contentChild;
@ContentChild(ChildDirective) contentChild: ChildDirective;
ngAfterContentInit() {
// contentChild is set