Skip to content

Commit 0bb94df

Browse files
vsavkinmprobst
authored andcommitted
docs(core): docs fixes (angular#11212)
1 parent 50e171c commit 0bb94df

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

modules/@angular/core/src/di/provider.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ export interface TypeProvider extends Type<any> {}
4646
* Configures the {@link Injector} to return a value for a token.
4747
*
4848
* ### Example
49+
* ```javascript
4950
* const injector = Injector.resolveAndCreate([
5051
* {provide: String, useValue: 'Hello'}
5152
* ]);
@@ -74,8 +75,8 @@ export interface ValueProvider {
7475
* var locale = new OpaqueToken('local');
7576
*
7677
* const injector = Injector.resolveAndCreate([
77-
* { provide: locale, useValue: 'en' },
78-
* { provide: locale, useValue: 'sk' },
78+
* { provide: locale, multi: true, useValue: 'en' },
79+
* { provide: locale, multi: true, useValue: 'sk' },
7980
* ]);
8081
*
8182
* const locales: string[] = injector.get(locale);

modules/@angular/core/src/metadata.ts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -807,8 +807,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
807807
* <child-cmp></child-cmp>
808808
* <child-cmp></child-cmp>
809809
* <child-cmp></child-cmp>
810-
* `,
811-
* directives: [ChildCmp]
810+
* `
812811
* })
813812
* class SomeCmp {
814813
* @ViewChildren(ChildCmp) children:QueryList<ChildCmp>;
@@ -837,8 +836,7 @@ export var ContentChild: ContentChildMetadataFactory = makePropDecorator(Content
837836
* <child-cmp #child1></child-cmp>
838837
* <child-cmp #child2></child-cmp>
839838
* <child-cmp #child3></child-cmp>
840-
* `,
841-
* directives: [ChildCmp]
839+
* `
842840
* })
843841
* class SomeCmp {
844842
* @ViewChildren('child1,child2,child3') children:QueryList<ChildCmp>;
@@ -887,8 +885,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
887885
*
888886
* @Component({
889887
* selector: 'some-cmp',
890-
* template: '<child-cmp></child-cmp>',
891-
* directives: [ChildCmp]
888+
* template: '<child-cmp></child-cmp>'
892889
* })
893890
* class SomeCmp {
894891
* @ViewChild(ChildCmp) child:ChildCmp;
@@ -913,8 +910,7 @@ export var ViewChildren: ViewChildrenMetadataFactory = makePropDecorator(ViewChi
913910
*
914911
* @Component({
915912
* selector: 'some-cmp',
916-
* template: '<child-cmp #child></child-cmp>',
917-
* directives: [ChildCmp]
913+
* template: '<child-cmp #child></child-cmp>'
918914
* })
919915
* class SomeCmp {
920916
* @ViewChild('child') child:ChildCmp;

modules/@angular/core/src/metadata/di.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,8 @@ export class ViewChildrenMetadata extends ViewQueryMetadata {
428428
*
429429
* - If the argument is a type, a directive or a component with the type will be bound.
430430
*
431-
If the argument is a string, the string is interpreted as a selector. An element containing the
432-
matching template variable (e.g. `#child`) will be bound.
431+
* If the argument is a string, the string is interpreted as a selector. An element containing the
432+
* matching template variable (e.g. `#child`) will be bound.
433433
*
434434
* In either case, `@ViewChild()` assigns the first (looking from above) element if there are
435435
multiple matches.

modules/@angular/core/src/util/decorators.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,13 @@ export interface ClassDefinition {
5050
* ```
5151
* var MyClass = ng
5252
* .Component({...})
53-
* .View({...})
5453
* .Class({...});
5554
* ```
5655
*
5756
* ES7 syntax:
5857
*
5958
* ```
6059
* @ng.Component({...})
61-
* @ng.View({...})
6260
* class MyClass {...}
6361
* ```
6462
* @stable

0 commit comments

Comments
 (0)