From 0bb94df1dad165aff8058797d06c6340d3865686 Mon Sep 17 00:00:00 2001 From: Victor Savkin Date: Thu, 1 Sep 2016 11:45:59 -0700 Subject: [PATCH] docs(core): docs fixes (#11212) --- modules/@angular/core/src/di/provider.ts | 5 +++-- modules/@angular/core/src/metadata.ts | 12 ++++-------- modules/@angular/core/src/metadata/di.ts | 4 ++-- modules/@angular/core/src/util/decorators.ts | 2 -- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/modules/@angular/core/src/di/provider.ts b/modules/@angular/core/src/di/provider.ts index 9f05bbd983..170b2f562e 100644 --- a/modules/@angular/core/src/di/provider.ts +++ b/modules/@angular/core/src/di/provider.ts @@ -46,6 +46,7 @@ export interface TypeProvider extends Type {} * Configures the {@link Injector} to return a value for a token. * * ### Example + * ```javascript * const injector = Injector.resolveAndCreate([ * {provide: String, useValue: 'Hello'} * ]); @@ -74,8 +75,8 @@ export interface ValueProvider { * var locale = new OpaqueToken('local'); * * const injector = Injector.resolveAndCreate([ - * { provide: locale, useValue: 'en' }, - * { provide: locale, useValue: 'sk' }, + * { provide: locale, multi: true, useValue: 'en' }, + * { provide: locale, multi: true, useValue: 'sk' }, * ]); * * const locales: string[] = injector.get(locale); diff --git a/modules/@angular/core/src/metadata.ts b/modules/@angular/core/src/metadata.ts index 29d2256d4b..1e504664e3 100644 --- a/modules/@angular/core/src/metadata.ts +++ b/modules/@angular/core/src/metadata.ts @@ -807,8 +807,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content * * * - * `, - * directives: [ChildCmp] + * ` * }) * class SomeCmp { * @ViewChildren(ChildCmp) children:QueryList; @@ -837,8 +836,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content * * * - * `, - * directives: [ChildCmp] + * ` * }) * class SomeCmp { * @ViewChildren('child1,child2,child3') children:QueryList; @@ -887,8 +885,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi * * @Component({ * selector: 'some-cmp', - * template: '', - * directives: [ChildCmp] + * template: '' * }) * class SomeCmp { * @ViewChild(ChildCmp) child:ChildCmp; @@ -913,8 +910,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi * * @Component({ * selector: 'some-cmp', - * template: '', - * directives: [ChildCmp] + * template: '' * }) * class SomeCmp { * @ViewChild('child') child:ChildCmp; diff --git a/modules/@angular/core/src/metadata/di.ts b/modules/@angular/core/src/metadata/di.ts index c233b10abd..307ed6f30f 100644 --- a/modules/@angular/core/src/metadata/di.ts +++ b/modules/@angular/core/src/metadata/di.ts @@ -428,8 +428,8 @@ export class ViewChildrenMetadata extends ViewQueryMetadata { * * - If the argument is a type, a directive or a component with the type will be bound. * - If the argument is a string, the string is interpreted as a selector. An element containing the - matching template variable (e.g. `#child`) will be bound. + * If the argument is a string, the string is interpreted as a selector. An element containing the + * matching template variable (e.g. `#child`) will be bound. * * In either case, `@ViewChild()` assigns the first (looking from above) element if there are multiple matches. diff --git a/modules/@angular/core/src/util/decorators.ts b/modules/@angular/core/src/util/decorators.ts index d9a7608c5d..4ca48be6d7 100644 --- a/modules/@angular/core/src/util/decorators.ts +++ b/modules/@angular/core/src/util/decorators.ts @@ -50,7 +50,6 @@ export interface ClassDefinition { * ``` * var MyClass = ng * .Component({...}) - * .View({...}) * .Class({...}); * ``` * @@ -58,7 +57,6 @@ export interface ClassDefinition { * * ``` * @ng.Component({...}) - * @ng.View({...}) * class MyClass {...} * ``` * @stable