angular-docs-cn/packages/examples
Alan Agius bbd556ee9f test: enable importHelpers for UMD builds (#36989)
This is a workaround for a TS 3.9 regression https://github.com/microsoft/TypeScript/issues/38501 where the emitted `__exportStar` helpers have a missing semi-colon at the end of the unnamed function, when targetting UMD, and causes the following runtime error `Uncaught TypeError: (intermediate value)(…) is not a function`.

This is because the anonymous `__exportStar` function will be invoked with the function on the next like as the parameter which is subsequently invoking whatever was returned.

To get around this TS bug, add `importHelpers: true` in your tsconfig. This also, is recommanded to avoid multiple copies of the same helper being inlined, which might cause increase in bundle size.

PR Close #36989
2020-05-14 10:50:30 -07:00
..
common build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
compiler build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
core build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
forms build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
http build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
platform-browser build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
router/activated-route build: re-enable template type-checking for various targets across the repo (#34144) 2019-12-02 11:24:18 -08:00
service-worker build: re-enable template type-checking for various targets across the repo (#34144) 2019-12-02 11:24:18 -08:00
test-utils build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
testing build: reformat repo to new clang@1.4.0 (#36613) 2020-04-14 12:08:36 -07:00
upgrade test: enable importHelpers for UMD builds (#36989) 2020-05-14 10:50:30 -07:00
BUILD.bazel build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
README.md build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
index.html build: set default ts_devserver serving_path to /app_bundle.js to match g3 (#33996) 2019-11-26 16:09:32 -08:00
tsconfig-e2e.json build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00

README.md

API Examples

This folder contains small example apps that get in-lined into our API docs. Each example contains tests for application behavior (as opposed to testing Angular's behavior) just like an Angular application developer would write.

Running the examples

# Serving individual examples (e.g. common)
yarn bazel run //packages/examples/common:devserver

# "core" examples
yarn bazel run //packages/examples/core:devserver

Running the tests

yarn bazel test //packages/examples/...