Skip to content

chore(docs): create missing markdown files for cdk items #6770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/cdk/a11y/focus-key-manager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### FocusKeyManager
`ListKeyManager` manages the focus of an item based on keyboard interaction.
3 changes: 3 additions & 0 deletions src/cdk/coercion/coercion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Coercion

Utility functions for coercing `@Input`s into specific types.
3 changes: 3 additions & 0 deletions src/cdk/collections/collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Collections

A set of utilities for managing collections.
26 changes: 26 additions & 0 deletions src/cdk/keycodes/keycodes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### KeyCodes

Commonly used keycode constants.

#### Example
```ts
import {Directive} from '@angular/core';
import {UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW} from '@angular/cdk/keycodes';

@Directive({
selector: '[count-arrows]'
host: {
(keypress): 'handleKeyPress($event)'
}
})
export class ArrowCounterDirective {
arrowPressCount = 0;

handleKeyPress(event: KeyboardEvent) {
if ([UP_ARROW, DOWN_ARROW, LEFT_ARROW, RIGHT_ARROW].includes(event.keyCode)) {
this.arrowPresscount++;
}
}
}
```

12 changes: 12 additions & 0 deletions src/cdk/observers/observers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
### Observers

A directive for observing when the content of the host element changes. An event is emitted when a
mutation to the content is observed.

#### Example

```html
<div class="projected-content-wrapper" (cdkObserveContent)="projectContentChanged()">
<ng-content></ng-content>
</div>
```
3 changes: 3 additions & 0 deletions src/cdk/overlay/overlay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Overlay

A service used to manage overlays.
3 changes: 3 additions & 0 deletions src/cdk/platform/platform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Platform

A service for determing the current platform.
27 changes: 27 additions & 0 deletions src/cdk/rxjs/rxjs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### RxJS Usage
When dealing with RxJS operators it is important to be aware that using the "patch" imports will
pollute the global Observable object (e.g. `import "rxjs/add/operator/map"`). When creating a
component library, it is highly recommended to import the operator functions directly (e.g.
`import "rxjs/operator/map"`):

```ts
// NO
import 'rxjs/add/operator/map';
someObservable.map(...).subscribe(...);

// YES
import {map} from 'rxjs/operator/map';
map.call(someObservable, ...).subscribe(...);
```

#### RxChain
Because this approach can be inflexible when dealing with long chains of operators. You should use
the `RxChain` class to help with it:

```ts
// Before
someObservable.filter(...).map(...).do(...);

// After
RxChain.from(someObservable).call(filter, ...).call(map, ...).subscribe(...);
```
3 changes: 3 additions & 0 deletions src/cdk/scrolling/scrolling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Scrolling

Some things to help with scrollling.
3 changes: 3 additions & 0 deletions src/cdk/scrolling/viewport.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Viewport

A utility for getting the bounds of the browser viewport.