Skip to content

Commit 55e1f36

Browse files
committed
Create missing markdown files for cdk items.
1 parent 70bd5fc commit 55e1f36

File tree

10 files changed

+85
-0
lines changed

10 files changed

+85
-0
lines changed

src/cdk/a11y/focus-key-manager.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### FocusKeyManager
2+
`ListKeyManager` manages the focus of an item based on keyboard interaction.

src/cdk/coercion/coercion.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Coercion
2+
3+
Utility functions for coercing `@Input`s into specific types.

src/cdk/collections/collections.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Collections
2+
3+
A set of utilities for managing collections.

src/cdk/keycodes/keycodes.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
### KeyCodes
2+
3+
Commonly used keycode constants.
4+
5+
#### Example
6+
```ts
7+
import {Directive} from '@angular/core';
8+
import {UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW} from '@angular/cdk/keycodes';
9+
10+
@Directive({
11+
selector: '[count-arrows]'
12+
host: {
13+
(keypress): 'handleKeyPress($event)'
14+
}
15+
})
16+
export class ArrowCounterDirective {
17+
arrowPressCount = 0;
18+
19+
handleKeyPress(event: KeyboardEvent) {
20+
if ([UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW].includes(event.keyCode)) {
21+
this.arrowPresscount++;
22+
}
23+
}
24+
}
25+
```
26+

src/cdk/observers/observers.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### Observers
2+
3+
A directive for observing when the content of the host element changes. An event is emitted when a
4+
mutation to the content is observed.
5+
6+
#### Example
7+
8+
```html
9+
<div class="projected-content-wrapper" (cdkObserveContent)="projectContentChanged()">
10+
<ng-content></ng-content>
11+
</div>
12+
```

src/cdk/overlay/overlay.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Overlay
2+
3+
A service used to manage overlays.

src/cdk/platform/platform.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Platform
2+
3+
A service for determing the current platform.

src/cdk/rxjs/rxjs.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### RxJS Usage
2+
When dealing with RxJS operators it is important to be aware that using the "patch" imports will
3+
pollute the global Observable object (e.g. `import "rxjs/add/operator/map"`). When creating a
4+
component library, it is highly recommended to import the operator functions directly (e.g.
5+
`import "rxjs/operator/map"`):
6+
7+
```ts
8+
// NO
9+
import 'rxjs/add/operator/map';
10+
someObservable.map(...).subscribe(...);
11+
12+
// YES
13+
import {map} from 'rxjs/operator/map';
14+
map.call(someObservable, ...).subscribe(...);
15+
```
16+
17+
#### RxChain
18+
Because this approach can be inflexible when dealing with long chains of operators. You should use
19+
the `RxChain` class to help with it:
20+
21+
```ts
22+
// Before
23+
someObservable.filter(...).map(...).do(...);
24+
25+
// After
26+
RxChain.from(someObservable).call(filter, ...).call(map, ...).subscribe(...);
27+
```

src/cdk/scrolling/scrolling.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Scrolling
2+
3+
Some things to help with scrollling.

src/cdk/scrolling/viewport.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Viewport
2+
3+
A utility for getting the bounds of the browser viewport.

0 commit comments

Comments
 (0)