docs(core): docs fixes (#11212)
This commit is contained in:
parent
50e171c09b
commit
0bb94df1da
|
@ -46,6 +46,7 @@ export interface TypeProvider extends Type<any> {}
|
||||||
* Configures the {@link Injector} to return a value for a token.
|
* Configures the {@link Injector} to return a value for a token.
|
||||||
*
|
*
|
||||||
* ### Example
|
* ### Example
|
||||||
|
* ```javascript
|
||||||
* const injector = Injector.resolveAndCreate([
|
* const injector = Injector.resolveAndCreate([
|
||||||
* {provide: String, useValue: 'Hello'}
|
* {provide: String, useValue: 'Hello'}
|
||||||
* ]);
|
* ]);
|
||||||
|
@ -74,8 +75,8 @@ export interface ValueProvider {
|
||||||
* var locale = new OpaqueToken('local');
|
* var locale = new OpaqueToken('local');
|
||||||
*
|
*
|
||||||
* const injector = Injector.resolveAndCreate([
|
* const injector = Injector.resolveAndCreate([
|
||||||
* { provide: locale, useValue: 'en' },
|
* { provide: locale, multi: true, useValue: 'en' },
|
||||||
* { provide: locale, useValue: 'sk' },
|
* { provide: locale, multi: true, useValue: 'sk' },
|
||||||
* ]);
|
* ]);
|
||||||
*
|
*
|
||||||
* const locales: string[] = injector.get(locale);
|
* const locales: string[] = injector.get(locale);
|
||||||
|
|
|
@ -807,8 +807,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
|
||||||
* <child-cmp></child-cmp>
|
* <child-cmp></child-cmp>
|
||||||
* <child-cmp></child-cmp>
|
* <child-cmp></child-cmp>
|
||||||
* <child-cmp></child-cmp>
|
* <child-cmp></child-cmp>
|
||||||
* `,
|
* `
|
||||||
* directives: [ChildCmp]
|
|
||||||
* })
|
* })
|
||||||
* class SomeCmp {
|
* class SomeCmp {
|
||||||
* @ViewChildren(ChildCmp) children:QueryList<ChildCmp>;
|
* @ViewChildren(ChildCmp) children:QueryList<ChildCmp>;
|
||||||
|
@ -837,8 +836,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
|
||||||
* <child-cmp #child1></child-cmp>
|
* <child-cmp #child1></child-cmp>
|
||||||
* <child-cmp #child2></child-cmp>
|
* <child-cmp #child2></child-cmp>
|
||||||
* <child-cmp #child3></child-cmp>
|
* <child-cmp #child3></child-cmp>
|
||||||
* `,
|
* `
|
||||||
* directives: [ChildCmp]
|
|
||||||
* })
|
* })
|
||||||
* class SomeCmp {
|
* class SomeCmp {
|
||||||
* @ViewChildren('child1,child2,child3') children:QueryList<ChildCmp>;
|
* @ViewChildren('child1,child2,child3') children:QueryList<ChildCmp>;
|
||||||
|
@ -887,8 +885,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
* selector: 'some-cmp',
|
* selector: 'some-cmp',
|
||||||
* template: '<child-cmp></child-cmp>',
|
* template: '<child-cmp></child-cmp>'
|
||||||
* directives: [ChildCmp]
|
|
||||||
* })
|
* })
|
||||||
* class SomeCmp {
|
* class SomeCmp {
|
||||||
* @ViewChild(ChildCmp) child:ChildCmp;
|
* @ViewChild(ChildCmp) child:ChildCmp;
|
||||||
|
@ -913,8 +910,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
|
||||||
*
|
*
|
||||||
* @Component({
|
* @Component({
|
||||||
* selector: 'some-cmp',
|
* selector: 'some-cmp',
|
||||||
* template: '<child-cmp #child></child-cmp>',
|
* template: '<child-cmp #child></child-cmp>'
|
||||||
* directives: [ChildCmp]
|
|
||||||
* })
|
* })
|
||||||
* class SomeCmp {
|
* class SomeCmp {
|
||||||
* @ViewChild('child') child:ChildCmp;
|
* @ViewChild('child') child:ChildCmp;
|
||||||
|
|
|
@ -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 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
|
* 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.
|
* matching template variable (e.g. `#child`) will be bound.
|
||||||
*
|
*
|
||||||
* In either case, `@ViewChild()` assigns the first (looking from above) element if there are
|
* In either case, `@ViewChild()` assigns the first (looking from above) element if there are
|
||||||
multiple matches.
|
multiple matches.
|
||||||
|
|
|
@ -50,7 +50,6 @@ export interface ClassDefinition {
|
||||||
* ```
|
* ```
|
||||||
* var MyClass = ng
|
* var MyClass = ng
|
||||||
* .Component({...})
|
* .Component({...})
|
||||||
* .View({...})
|
|
||||||
* .Class({...});
|
* .Class({...});
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
|
@ -58,7 +57,6 @@ export interface ClassDefinition {
|
||||||
*
|
*
|
||||||
* ```
|
* ```
|
||||||
* @ng.Component({...})
|
* @ng.Component({...})
|
||||||
* @ng.View({...})
|
|
||||||
* class MyClass {...}
|
* class MyClass {...}
|
||||||
* ```
|
* ```
|
||||||
* @stable
|
* @stable
|
||||||
|
|
Loading…
Reference in New Issue