Skip to content
Closed
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* This example project is special in that it is not a cli app. To run tests appropriate for this
* project, the test command is overwritten in `aio/content/examples/observables-in-angular/example-config.json`.
*
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
* tests for this project.
*
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
}
]
}
6 changes: 3 additions & 3 deletions aio/content/examples/observables-in-angular/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export class ZippyComponent {
Time: {{ time | async }}</div>`
})
export class AsyncObservablePipeComponent {
time = new Observable(observer =>
setInterval(() => observer.next(new Date().toString()), 1000)
);
time = new Observable<string>(observer => {
setInterval(() => observer.next(new Date().toString()), 1000);
});
}

// #enddocregion pipe
Expand Down
9 changes: 9 additions & 0 deletions aio/content/examples/observables/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* This example project is special in that it is not a cli app. To run tests appropriate for this
* project, the test command is overwritten in `aio/content/examples/observables/example-config.json`.
*
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
* tests for this project.
*
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
*/
8 changes: 8 additions & 0 deletions aio/content/examples/observables/example-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* This example project is special in that it is not a cli app. To run tests appropriate for this
* project, the test command is overwritten in `aio/content/examples/practical-observable-usage/example-config.json`.
*
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
* tests for this project.
*
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
}
]
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@

import { fromEvent } from 'rxjs';
import { ajax } from 'rxjs/ajax';
import { map, filter, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
import { debounceTime, distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';
Comment thread
sonukapoor marked this conversation as resolved.
Resolved


const searchBox = document.getElementById('search-box');

const typeahead = fromEvent(searchBox, 'input').pipe(
map((e: KeyboardEvent) => e.target.value),
map((e: KeyboardEvent) => (e.target as HTMLInputElement).value),
filter(text => text.length > 2),
debounceTime(10),
distinctUntilChanged(),
Expand Down
9 changes: 9 additions & 0 deletions aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* This example project is special in that it is not a cli app. To run tests appropriate for this
* project, the test command is overwritten in `aio/content/examples/rx-libary/example-config.json`.
*
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
* tests for this project.
*
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
*/
8 changes: 8 additions & 0 deletions aio/content/examples/rx-library/example-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"e2e": [
{
"cmd": "yarn",
"args": [ "tsc", "--project", "./" ]
}
]
}
4 changes: 2 additions & 2 deletions aio/tools/examples/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
"@types/express": "^4.0.35",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "^2.0.4",
"@types/jquery": "^3.3.4",
"@types/node": "~8.9.4",
"@types/jquery":"3.3.28",
"@types/node":"~12.12.14",
"canonical-path": "1.0.0",
"concurrently": "^3.0.0",
"http-server": "^0.11.1",
Expand Down
21 changes: 15 additions & 6 deletions aio/tools/examples/shared/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,12 @@
dependencies:
"@types/jasmine" "*"

"@types/jquery@^3.3.4":
version "3.3.4"
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.4.tgz#f1850fb9a70041a14ace4f81a7ed782db8548317"
"@types/jquery@3.3.28":
version "3.3.28"
resolved "https://registry.yarnpkg.com/@types/jquery/-/jquery-3.3.28.tgz#e4e4e1a72a890b9d5fce34019d961265dd1394c4"
integrity sha512-6+0asQBU38H5kdoKvxVGE7fY8JREBgQsxONw0na0noV9D3JLN2+odBPKkTvRcLW20xSNiP8BH0nyl+8PcIHYNw==
dependencies:
"@types/sizzle" "*"

"@types/mime@*":
version "2.0.0"
Expand All @@ -465,9 +468,10 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-11.11.3.tgz#7c6b0f8eaf16ae530795de2ad1b85d34bf2f5c58"
integrity sha512-wp6IOGu1lxsfnrD+5mX6qwSwWuqsdkKKxTN4aQc4wByHAKZJf9/D4KXPQ1POUjEbnCP5LMggB0OEFNY9OTsMqg==

"@types/node@~8.9.4":
version "8.9.5"
resolved "https://registry.npmjs.org/@types/node/-/node-8.9.5.tgz#162b864bc70be077e6db212b322754917929e976"
"@types/node@~12.12.14":
version "12.12.14"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.12.14.tgz#1c1d6e3c75dba466e0326948d56e8bd72a1903d2"
integrity sha512-u/SJDyXwuihpwjXy7hOOghagLEV1KdAST6syfnOk6QZAMzZuWZqXy5aYYZbh8Jdpd4escVFP0MvftHNDb9pruA==

"@types/q@^0.0.32":
version "0.0.32"
Expand All @@ -484,6 +488,11 @@
"@types/express-serve-static-core" "*"
"@types/mime" "*"

"@types/sizzle@*":
version "2.3.2"
resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.2.tgz#a811b8c18e2babab7d542b3365887ae2e4d9de47"
integrity sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==

"@types/source-list-map@*":
version "0.1.2"
resolved "https://registry.yarnpkg.com/@types/source-list-map/-/source-list-map-0.1.2.tgz#0078836063ffaf17412349bba364087e0ac02ec9"
Expand Down