Skip to content
This repository was archived by the owner on Oct 1, 2018. It is now read-only.

Commit 5b3ad9b

Browse files
committed
refactor(operators): Adapt links for operators in different pages
1 parent f560418 commit 5b3ad9b

File tree

3 files changed

+47
-43
lines changed

3 files changed

+47
-43
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h2 class="related-operators"> Related Operators </h2>
22
<ul class="section-list">
33
<li *ngFor="let related of relatedOperators">
4-
<a [href]="'/operators#' + related"> {{ related }} </a>
4+
<a [routerLink]="['/operators', related]"> {{ related }} </a>
55
</li>
66
</ul>
Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
import { OperatorDoc } from '../operator.model';
22

33
export const combineAll: OperatorDoc = {
4-
'name': 'combineAll',
5-
'operatorType': 'combination',
6-
'signature': 'public combineAll(project: function): Observable',
7-
'parameters': [
4+
name: 'combineAll',
5+
operatorType: 'combination',
6+
signature: 'public combineAll(project: function): Observable',
7+
parameters: [
88
{
9-
'name': 'project',
10-
'type': 'function',
11-
'attribute': 'optional',
12-
'description': `An optional function to map the most recent values from each inner Observable into a new result.
9+
name: 'project',
10+
type: 'function',
11+
attribute: 'optional',
12+
description: `An optional function to map the most recent values from each inner Observable into a new result.
1313
Takes each of the most recent values from each collected inner Observable as arguments, in order.`
1414
}
1515
],
16-
'marbleUrl': 'http://reactivex.io/rxjs/img/combineAll.png',
17-
'shortDescription': {
18-
'description': `
19-
Flattens an Observable-of-Observables by applying <a href="/operators#combineLatest" class="markdown-code">combineLatest</a>
16+
marbleUrl: 'http://reactivex.io/rxjs/img/combineAll.png',
17+
shortDescription: {
18+
description: `
19+
Flattens an Observable-of-Observables by applying <a href="/operators/combineLatest" class="markdown-code">combineLatest</a>
2020
when the Observable-of-Observables completes.`,
21-
'extras': []
21+
extras: []
2222
},
23-
'walkthrough': {
24-
'description': `
23+
walkthrough: {
24+
description: `
2525
<p>
2626
Takes an Observable of Observables, and collects all Observables from it.
2727
Once the outer Observable completes, it subscribes to all collected
28-
Observables and combines their values using the <a href="/operators#combineLatest" class="markdown-code">combineLatest</a>
28+
Observables and combines their values using the <a href="/operators/combineLatest" class="markdown-code">combineLatest</a>
2929
strategy, such that:
3030
</p>
3131
<ul>
@@ -46,10 +46,11 @@ export const combineAll: OperatorDoc = {
4646
</ul>
4747
`
4848
},
49-
'examples': [
49+
examples: [
5050
{
51-
'name': 'Map two click events to a finite interval Observable, then apply <span class="markdown-code">combineAll</span>',
52-
'code': `
51+
name:
52+
'Map two click events to a finite interval Observable, then apply <span class="markdown-code">combineAll</span>',
53+
code: `
5354
const clicks = Rx.Observable.fromEvent(document, 'click');
5455
const higherOrder = clicks.map(ev =>
5556
Rx.Observable.interval(Math.random()*2000).take(3)
@@ -58,9 +59,12 @@ export const combineAll: OperatorDoc = {
5859
const result = higherOrder.combineAll();
5960
result.subscribe(x => console.log(x));
6061
`,
61-
'externalLink': { 'platform': 'JSBin', 'url': 'http://jsbin.com/peparawuvo/1/embed?js,console,output'}
62+
externalLink: {
63+
platform: 'JSBin',
64+
url: 'http://jsbin.com/peparawuvo/1/embed?js,console,output'
65+
}
6266
}
6367
],
64-
'relatedOperators': [ 'combineLatest', 'mergeAll' ],
65-
'additionalResources': []
68+
relatedOperators: ['combineLatest', 'mergeAll'],
69+
additionalResources: []
6670
};

src/operator-docs/filtering/debounceTime.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
import { OperatorDoc } from "../operator.model";
1+
import { OperatorDoc } from '../operator.model';
22

33
export const debounceTime: OperatorDoc = {
4-
name: "debounceTime",
5-
operatorType: "filtering",
4+
name: 'debounceTime',
5+
operatorType: 'filtering',
66
signature:
7-
"public debounceTime<T>(dueTime: number, scheduler: IScheduler = async): Observable",
7+
'public debounceTime<T>(dueTime: number, scheduler: IScheduler = async): Observable',
88
parameters: [
99
{
10-
name: "dueTime",
11-
type: "number",
12-
attribute: "mandatory",
10+
name: 'dueTime',
11+
type: 'number',
12+
attribute: 'mandatory',
1313
description: `The timeout duration in milliseconds
1414
(or the time unit determined internally by the optional scheduler) for the window of time required to
1515
wait for emission silence before emitting the most recent source value.`
1616
},
1717
{
18-
name: "scheduler",
19-
type: "IScheduler",
20-
attribute: "optional",
18+
name: 'scheduler',
19+
type: 'IScheduler',
20+
attribute: 'optional',
2121
description: `The IScheduler to use for managing the timers that handle the timeout for each value.`
2222
}
2323
],
24-
marbleUrl: "http://reactivex.io/rxjs/img/debounceTime.png",
24+
marbleUrl: 'http://reactivex.io/rxjs/img/debounceTime.png',
2525
shortDescription: {
2626
description: `
2727
Emits a value from the source Observable only after a particular time span has passed without another source emission.
28-
It's like <a class="markdown-code" href="href="/operators#delay">delay</a>
28+
It's like <a class="markdown-code" href="/operators/delay">delay</a>
2929
, but passes only the most recent value from each burst of emissions.`,
3030
extras: []
3131
},
@@ -52,7 +52,7 @@ export const debounceTime: OperatorDoc = {
5252
examples: [
5353
{
5454
name:
55-
"Emit the most recent value after a burst of value changes over a defined time",
55+
'Emit the most recent value after a burst of value changes over a defined time',
5656
code: `
5757
const search = document.querySelector('#search');
5858
const output = document.querySelector('#output');
@@ -64,17 +64,17 @@ export const debounceTime: OperatorDoc = {
6464
.subscribe((search)=> output.textContent=search);
6565
`,
6666
externalLink: {
67-
platform: "JSBin",
68-
url: "http://jsbin.com/gapobakuwu/edit?js,output"
67+
platform: 'JSBin',
68+
url: 'http://jsbin.com/gapobakuwu/edit?js,output'
6969
}
7070
}
7171
],
7272
relatedOperators: [
73-
"auditTime",
74-
"debounce",
75-
"delay",
76-
"sampleTime",
77-
"throttleTime"
73+
'auditTime',
74+
'debounce',
75+
'delay',
76+
'sampleTime',
77+
'throttleTime'
7878
],
7979
additionalResources: []
8080
};

0 commit comments

Comments
 (0)