Skip to content

Commit 8906b3e

Browse files
committed
updated versioning
1 parent 254c9d3 commit 8906b3e

File tree

5 files changed

+804
-414
lines changed

5 files changed

+804
-414
lines changed

assets/main.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
body {
22
display: flex;
3+
flex-direction: column;
34
padding: 0;
45
margin: 0;
56
height: 100vh;
7+
color: whitesmoke;
68
align-items: center;
79
justify-content: center;
810
background: #252525;

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<body>
1111
<img class="rxjs-logo" width="100" src="rxjs.png">
12+
<p class="message"></p>
1213
</body>
1314

1415
</html>

main.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
import { interval } from 'rxjs';
2-
import { scan } from 'rxjs/operators/';
1+
import { interval } from "rxjs";
2+
import { scan } from "rxjs/operators/";
33

44
// ****
55
//
66
// Welcome to your rxjs scratch pad 🤗
7-
//
7+
//
88
// ****
99

10-
var source = interval(2000);
10+
const source = interval(2000);
11+
12+
const sourceMessage = x => `rxjs logo spun ${x} times`;
13+
const messageElement = document.querySelector(".message");
14+
15+
const print = x => (messageElement.textContent = x);
1116

1217
source
13-
.pipe(scan((rotation, count) => count + 1, 0))
14-
.subscribe(x => console.log(`rxjs logo spun ${x} times`));
18+
.pipe(scan((rotation, count) => count + 1, 0))
19+
.subscribe(x => print(sourceMessage(x)));

0 commit comments

Comments
 (0)