docs(core): docs fixes (#11212)

This commit is contained in:
Victor Savkin 2016-09-01 11:45:59 -07:00 committed by Martin Probst
parent 50e171c09b
commit 0bb94df1da
4 changed files with 9 additions and 14 deletions

View File

@ -46,6 +46,7 @@ export interface TypeProvider extends Type<any> {}
* 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);

View File

@ -807,8 +807,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
* <child-cmp></child-cmp>
* <child-cmp></child-cmp>
* <child-cmp></child-cmp>
* `,
* directives: [ChildCmp]
* `
* })
* class SomeCmp {
* @ViewChildren(ChildCmp) children:QueryList<ChildCmp>;
@ -837,8 +836,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
* <child-cmp #child1></child-cmp>
* <child-cmp #child2></child-cmp>
* <child-cmp #child3></child-cmp>
* `,
* directives: [ChildCmp]
* `
* })
* class SomeCmp {
* @ViewChildren('child1,child2,child3') children:QueryList<ChildCmp>;
@ -887,8 +885,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
*
* @Component({
* selector: 'some-cmp',
* template: '<child-cmp></child-cmp>',
* directives: [ChildCmp]
* template: '<child-cmp></child-cmp>'
* })
* class SomeCmp {
* @ViewChild(ChildCmp) child:ChildCmp;
@ -913,8 +910,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
*
* @Component({
* selector: 'some-cmp',
* template: '<child-cmp #child></child-cmp>',
* directives: [ChildCmp]
* template: '<child-cmp #child></child-cmp>'
* })
* class SomeCmp {
* @ViewChild('child') child:ChildCmp;

View File

@ -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.

View File

@ -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