Compare commits
53 Commits
8.0.0-rc.5
...
6.1.1
Author | SHA1 | Date | |
---|---|---|---|
58698d7806 | |||
e26c25a062 | |||
0a6434b066 | |||
ff3550c304 | |||
6d4a14082c | |||
9ddf269c2c | |||
25a76a1492 | |||
8439a6ec2a | |||
1ef2eae3aa | |||
d5d034a0ff | |||
5ca35b3cd2 | |||
0a6a3f3163 | |||
3a601382e6 | |||
7a1fdde69e | |||
cbc2ea1b1a | |||
bdf801b0e8 | |||
fe5e8b7177 | |||
11f0f98ad8 | |||
801b534421 | |||
0fc83215e2 | |||
3d3a1a4642 | |||
32a40ba5de | |||
045271230d | |||
ec31f6bf9a | |||
4798d77088 | |||
08c6762039 | |||
26516045e7 | |||
a83b9f7911 | |||
1b7c77e49f | |||
3ab31a4be6 | |||
43dcf77123 | |||
d4bf2da3bd | |||
fa3882845a | |||
fa59748e00 | |||
c38ecb3b5b | |||
875efa8492 | |||
74964bde99 | |||
785fb5cc5a | |||
26d9f0278b | |||
22ebd53c17 | |||
a972c039c3 | |||
f5e18029fa | |||
317c7087c5 | |||
39abe7b7c1 | |||
36a7705a44 | |||
50a21885cf | |||
e86f3d9a49 | |||
738f2961ba | |||
f2bf8287ba | |||
9d5b34e1e7 | |||
d237f4014a | |||
8743a9bfd6 | |||
514d03f2d0 |
@ -3,7 +3,10 @@
|
||||
# See remote cache documentation in /docs/BAZEL.md
|
||||
|
||||
# Don't be spammy in the logs
|
||||
build --noshow_progress
|
||||
# TODO(gmagolan): Hide progress again once build performance improves
|
||||
# Presently, CircleCI can timeout during bazel test ... with the following
|
||||
# error: Too long with no output (exceeded 10m0s)
|
||||
# build --noshow_progress
|
||||
|
||||
# Don't run manual tests
|
||||
test --test_tag_filters=-manual
|
||||
|
195
.pullapprove.yml
195
.pullapprove.yml
@ -8,6 +8,7 @@
|
||||
# alexeagle - Alex Eagle
|
||||
# alxhub - Alex Rickabaugh
|
||||
# andrewseguin - Andrew Seguin
|
||||
# benlesh - Ben Lesh
|
||||
# brandonroberts - Brandon Roberts
|
||||
# brocco - Mike Brocchi
|
||||
# filipesilva - Filipe Silva
|
||||
@ -15,7 +16,7 @@
|
||||
# hansl - Hans Larsen
|
||||
# IgorMinar - Igor Minar
|
||||
# jasonaden - Jason Aden
|
||||
# kapunahelewong - Kapunahele Wong
|
||||
# jenniferfell - Jennifer Fell
|
||||
# kara - Kara Erickson
|
||||
# kyliau - Keen Yee Liau
|
||||
# matsko - Matias Niemelä
|
||||
@ -91,6 +92,7 @@ groups:
|
||||
- "*.bzl"
|
||||
- "packages/bazel/*"
|
||||
- "tools/bazel.rc"
|
||||
- "/docs/BAZEL.md"
|
||||
users:
|
||||
- alexeagle #primary
|
||||
- kyliau
|
||||
@ -130,42 +132,113 @@ groups:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/core/*"
|
||||
- "aio/content/guide/bootstrapping.md"
|
||||
- "aio/content/examples/bootstrapping/*"
|
||||
- "aio/content/guide/attribute-directives.md"
|
||||
- "aio/content/examples/attribute-directives/*"
|
||||
- "aio/content/images/guide/attribute-directives/*"
|
||||
- "aio/content/guide/structural-directives.md"
|
||||
- "aio/content/examples/structural-directives/*"
|
||||
- "aio/content/images/guide/structural-directives/*"
|
||||
- "aio/content/guide/dynamic-component-loader.md"
|
||||
- "aio/content/examples/dynamic-component-loader/*"
|
||||
- "aio/content/images/guide/dynamic-component-loader/*"
|
||||
- "aio/content/guide/template-syntax.md"
|
||||
- "aio/content/examples/template-syntax/*"
|
||||
- "aio/content/images/guide/template-syntax/*"
|
||||
- "aio/content/guide/dependency-injection.md"
|
||||
- "aio/content/examples/dependency-injection/*"
|
||||
- "aio/content/images/guide/dependency-injection/*"
|
||||
- "aio/content/guide/dependency-injection-in-action.md"
|
||||
- "aio/content/examples/dependency-injection-in-action/*"
|
||||
- "aio/content/images/guide/dependency-injection-in-action/*"
|
||||
- "aio/content/guide/hierarchical-dependency-injection.md"
|
||||
- "aio/content/examples/hierarchical-dependency-injection/*"
|
||||
- "aio/content/guide/singleton-services.md"
|
||||
- "aio/content/guide/dependency-injection-pattern.md"
|
||||
- "aio/content/guide/providers.md"
|
||||
- "aio/content/examples/providers/*"
|
||||
- "aio/content/guide/component-interaction.md"
|
||||
- "aio/content/examples/component-interaction/*"
|
||||
- "aio/content/images/guide/component-interaction/*"
|
||||
- "aio/content/guide/component-styles.md"
|
||||
- "aio/content/examples/component-styles/*"
|
||||
- "aio/content/guide/lifecycle-hooks.md"
|
||||
- "aio/content/examples/lifecycle-hooks/*"
|
||||
- "aio/content/images/guide/lifecycle-hooks/*"
|
||||
- "aio/content/examples/ngcontainer/*"
|
||||
- "aio/content/images/guide/ngcontainer/*"
|
||||
- "aio/content/guide/pipes.md"
|
||||
- "aio/content/examples/pipes/*"
|
||||
- "aio/content/images/guide/pipes/*"
|
||||
- "aio/content/guide/entry-components.md"
|
||||
- "aio/content/guide/set-document-title.md"
|
||||
- "aio/content/examples/set-document-title/*"
|
||||
- "aio/content/images/guide/set-document-title/*"
|
||||
- "aio/content/guide/ngmodules.md"
|
||||
- "aio/content/examples/ngmodules/*"
|
||||
- "aio/content/examples/ngmodule/*"
|
||||
- "aio/content/images/guide/ngmodule/*"
|
||||
- "aio/content/guide/ngmodule-faq.md"
|
||||
- "aio/content/examples/ngmodule-faq/*"
|
||||
- "aio/content/guide/module-types.md"
|
||||
- "aio/content/guide/sharing-ngmodules.md"
|
||||
- "aio/content/guide/frequent-ngmodules.md"
|
||||
- "aio/content/images/guide/frequent-ngmodules/*"
|
||||
- "aio/content/guide/ngmodule-api.md"
|
||||
- "aio/content/guide/ngmodule-vs-jsmodule.md"
|
||||
- "aio/content/guide/feature-modules.md"
|
||||
- "aio/content/examples/feature-modules/*"
|
||||
- "aio/content/images/guide/feature-modules/*"
|
||||
- "aio/content/guide/lazy-loading-ngmodules.md"
|
||||
- "aio/content/examples/lazy-loading-ngmodules/*"
|
||||
- "aio/content/images/guide/lazy-loading-ngmodules"
|
||||
users:
|
||||
- mhevery #primary
|
||||
- jasonaden
|
||||
- kara
|
||||
- vicb
|
||||
- IgorMinar #fallback
|
||||
- IgorMinar
|
||||
- jenniferfell #docs only
|
||||
|
||||
animations:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/animations/*"
|
||||
- "packages/platform-browser/animations/*"
|
||||
- "aio/content/guide/animations.md"
|
||||
- "aio/content/examples/animations/*"
|
||||
- "aio/content/images/guide/animations/*"
|
||||
users:
|
||||
- matsko #primary
|
||||
- mhevery #fallback
|
||||
- IgorMinar #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
compiler/i18n:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/compiler/src/i18n/*"
|
||||
- "aio/content/guide/i18n.md"
|
||||
- "aio/content/examples/i18n/*"
|
||||
users:
|
||||
- vicb #primary
|
||||
- alxhub
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
compiler:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/compiler/*"
|
||||
- "aio/content/guide/aot-compiler.md"
|
||||
users:
|
||||
- alxhub #primary
|
||||
- vicb
|
||||
- mhevery
|
||||
- IgorMinar #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
compiler-cli/ngtools:
|
||||
conditions:
|
||||
@ -174,7 +247,6 @@ groups:
|
||||
users:
|
||||
- hansl
|
||||
- filipesilva #fallback
|
||||
- brocco #fallback
|
||||
- IgorMinar #fallback
|
||||
|
||||
compiler-cli:
|
||||
@ -210,56 +282,97 @@ groups:
|
||||
files:
|
||||
- "packages/forms/*"
|
||||
- "aio/content/guide/forms.md"
|
||||
- "aio/content/guide/form-validation.md"
|
||||
- "aio/content/guide/reactive-forms.md"
|
||||
- "aio/content/examples/forms/*"
|
||||
- "aio/content/images/guide/forms/*"
|
||||
- "aio/content/guide/form-validation.md"
|
||||
- "aio/content/examples/form-validation/*"
|
||||
- "aio/content/images/guide/form-validation/*"
|
||||
- "aio/content/guide/dynamic-form.md"
|
||||
- "aio/content/examples/dynamic-form/*"
|
||||
- "aio/content/images/guide/dynamic-form/*"
|
||||
- "aio/content/guide/reactive-forms.md"
|
||||
- "aio/content/examples/reactive-forms/*"
|
||||
- "aio/content/images/guide/reactive-forms/*"
|
||||
users:
|
||||
- kara #primary
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
http:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/common/http/*"
|
||||
- "packages/http/*"
|
||||
- "aio/content/guide/http.md"
|
||||
- "aio/content/examples/http/*"
|
||||
- "aio/content/images/guide/http/*"
|
||||
users:
|
||||
- alxhub #primary
|
||||
- IgorMinar
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
language-service:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/language-service/*"
|
||||
- "aio/content/guide/language-service.md"
|
||||
- "aio/content/images/guide/language-service/*"
|
||||
users:
|
||||
- kyliau #primary
|
||||
# needs secondary
|
||||
- vicb
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
router:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/router/*"
|
||||
- "aio/content/guide/router.md"
|
||||
- "aio/content/examples/router/*"
|
||||
- "aio/content/images/guide/router/*"
|
||||
users:
|
||||
- jasonaden #primary
|
||||
- vicb
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
testing:
|
||||
conditions:
|
||||
files:
|
||||
- "*/testing/*"
|
||||
- "aio/content/guide/testing.md"
|
||||
- "aio/content/examples/testing/*"
|
||||
- "aio/content/images/guide/testing/*"
|
||||
users:
|
||||
- vikerman
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
upgrade:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/upgrade/*"
|
||||
- "aio/content/guide/upgrade.md"
|
||||
- "aio/content/examples/upgrade-module/*"
|
||||
- "aio/content/images/guide/upgrade/*"
|
||||
- "aio/content/examples/upgrade-phonecat-1-typescript/*"
|
||||
- "aio/content/examples/upgrade-phonecat-2-hybrid/*"
|
||||
- "aio/content/examples/upgrade-phonecat-3-final/*"
|
||||
- "aio/content/guide/upgrade-performance.md"
|
||||
- "aio/content/guide/ajs-quick-reference.md"
|
||||
- "aio/content/examples/ajs-quick-reference/*"
|
||||
users:
|
||||
- petebacondarwin #primary
|
||||
- gkalpak
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
platform-browser:
|
||||
conditions:
|
||||
@ -275,12 +388,15 @@ groups:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/platform-server/*"
|
||||
- "aio/content/guide/universal.md"
|
||||
- "aio/content/examples/universal/*"
|
||||
users:
|
||||
- vikerman #primary
|
||||
- alxhub #secondary
|
||||
- vicb
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
platform-webworker:
|
||||
conditions:
|
||||
@ -296,22 +412,34 @@ groups:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/service-worker/*"
|
||||
- "aio/content/guide/service-worker-getting-started.md"
|
||||
- "aio/content/examples/service-worker-getting-started/*"
|
||||
- "aio/content/guide/service-worker-communications.md"
|
||||
- "aio/content/guide/service-worker-config.md"
|
||||
- "aio/content/guide/service-worker-devops.md"
|
||||
- "aio/content/guide/service-worker-intro.md"
|
||||
- "aio/content/images/guide/service-worker/*"
|
||||
users:
|
||||
- alxhub #primary
|
||||
- gkalpak
|
||||
- IgorMinar #fallback
|
||||
- gkalpak #primary
|
||||
- alxhub
|
||||
- IgorMinar
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
elements:
|
||||
conditions:
|
||||
files:
|
||||
- "packages/elements/*"
|
||||
- "aio/content/examples/elements/*"
|
||||
- "aio/content/images/guide/elements/*"
|
||||
- "aio/content/guide/elements.md"
|
||||
users:
|
||||
- andrewseguin #primary
|
||||
- gkalpak
|
||||
- robwormald
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
||||
benchpress:
|
||||
conditions:
|
||||
@ -323,7 +451,7 @@ groups:
|
||||
- IgorMinar #fallback
|
||||
- mhevery #fallback
|
||||
|
||||
angular.io:
|
||||
docs-infra:
|
||||
conditions:
|
||||
files:
|
||||
include:
|
||||
@ -336,7 +464,7 @@ groups:
|
||||
- gkalpak
|
||||
- mhevery #fallback
|
||||
|
||||
angular.io-guide-and-tutorial:
|
||||
docs/guide-and-tutorial:
|
||||
conditions:
|
||||
files:
|
||||
include:
|
||||
@ -346,19 +474,20 @@ groups:
|
||||
- "aio/content/navigation.json"
|
||||
- "aio/content/license.md"
|
||||
users:
|
||||
- kapunahelewong
|
||||
- stephenfluin
|
||||
- jenniferfell
|
||||
- brandonroberts
|
||||
- petebacondarwin
|
||||
- gkalpak
|
||||
- IgorMinar
|
||||
- brandonroberts
|
||||
- mhevery #fallback
|
||||
|
||||
angular.io-marketing:
|
||||
docs/marketing:
|
||||
conditions:
|
||||
files:
|
||||
include:
|
||||
- "aio/content/marketing/*"
|
||||
- "aio/content/images/marketing/*"
|
||||
- "aio/content/navigation.json"
|
||||
- "aio/content/license.md"
|
||||
users:
|
||||
@ -368,3 +497,43 @@ groups:
|
||||
- IgorMinar
|
||||
- robwormald
|
||||
- mhevery #fallback
|
||||
|
||||
docs/observables:
|
||||
conditions:
|
||||
files:
|
||||
- "aio/content/examples/observables/*"
|
||||
- "aio/content/images/guide/observables/*"
|
||||
- "aio/content/guide/observables.md"
|
||||
- "aio/content/guide/comparing-observables.md"
|
||||
- "aio/content/examples/observables-in-angular/*"
|
||||
- "aio/content/images/guide/observables-in-angular/*"
|
||||
- "aio/content/guide/observables-in-angular.md"
|
||||
- "aio/content/examples/practical-observable-usage/*"
|
||||
- "aio/content/guide/practical-observable-usage.md"
|
||||
- "aio/content/examples/rx-library/*"
|
||||
- "aio/content/guide/rx-library.md"
|
||||
users:
|
||||
- jasonaden
|
||||
- benlesh
|
||||
- IgorMinar
|
||||
- mhevery
|
||||
- jenniferfell #docs only
|
||||
|
||||
docs/packaging:
|
||||
conditions:
|
||||
files:
|
||||
- "aio/content/guide/npm-packages.md"
|
||||
- "aio/content/guide/browser-support.md"
|
||||
- "aio/content/guide/typescript-configuration.md"
|
||||
- "aio/content/guide/setup-systemjs-anatomy.md"
|
||||
- "aio/content/examples/setup/*"
|
||||
- "aio/content/guide/setup.md"
|
||||
- "aio/content/guide/deployment.md"
|
||||
- "aio/content/guide/releases.md"
|
||||
- "aio/content/guide/updating.md"
|
||||
users:
|
||||
- IgorMinar #primary
|
||||
- alexeagle
|
||||
- hansl
|
||||
- mhevery #fallback
|
||||
- jenniferfell #docs only
|
||||
|
223
BUILD.bazel
223
BUILD.bazel
@ -15,220 +15,19 @@ alias(
|
||||
actual = "@nodejs//:yarn",
|
||||
)
|
||||
|
||||
node_modules_filegroup(
|
||||
alias(
|
||||
name = "node_modules",
|
||||
packages = [
|
||||
"adm-zip",
|
||||
"ajv",
|
||||
"angular",
|
||||
"angular-1.5",
|
||||
"angular-mocks",
|
||||
"angular-mocks-1.5",
|
||||
"anymatch",
|
||||
"arr-diff",
|
||||
"arr-flatten",
|
||||
"arr-union",
|
||||
"array-unique",
|
||||
"asn1",
|
||||
"assert-plus",
|
||||
"assign-symbols",
|
||||
"async-each",
|
||||
"asynckit",
|
||||
"atob",
|
||||
"aws-sign2",
|
||||
"aws4",
|
||||
"balanced-match",
|
||||
"base",
|
||||
"base64-js",
|
||||
"binary-extensions",
|
||||
"blocking-proxy",
|
||||
"brace-expansion",
|
||||
"braces",
|
||||
"bytebuffer",
|
||||
"cache-base",
|
||||
"caseless",
|
||||
"chokidar",
|
||||
"class-utils",
|
||||
"co",
|
||||
"collection-visit",
|
||||
"combined-stream",
|
||||
"component-emitter",
|
||||
"concat-map",
|
||||
"copy-descriptor",
|
||||
"core-util-is",
|
||||
"debug",
|
||||
"decode-uri-component",
|
||||
"define-property",
|
||||
"delayed-stream",
|
||||
"domino",
|
||||
"expand-brackets",
|
||||
"expand-range",
|
||||
"extend",
|
||||
"extend-shallow",
|
||||
"extglob",
|
||||
"extsprintf",
|
||||
"fast-deep-equal",
|
||||
"fast-json-stable-stringify",
|
||||
"filename-regex",
|
||||
"fill-range",
|
||||
"for-in",
|
||||
"for-own",
|
||||
"forever-agent",
|
||||
"form-data",
|
||||
"fragment-cache",
|
||||
"fs.realpath",
|
||||
"get-value",
|
||||
"glob",
|
||||
"glob-base",
|
||||
"glob-parent",
|
||||
"graceful-fs",
|
||||
"hammerjs",
|
||||
"har-schema",
|
||||
"har-validator",
|
||||
"has-value",
|
||||
"has-values",
|
||||
"http-signature",
|
||||
"https-proxy-agent",
|
||||
"inflight",
|
||||
"inherits",
|
||||
"is-accessor-descriptor",
|
||||
"is-binary-path",
|
||||
"is-buffer",
|
||||
"is-data-descriptor",
|
||||
"is-descriptor",
|
||||
"is-dotfile",
|
||||
"is-equal-shallow",
|
||||
"is-extendable",
|
||||
"is-extglob",
|
||||
"is-glob",
|
||||
"is-number",
|
||||
"is-plain-object",
|
||||
"is-posix-bracket",
|
||||
"is-primitive",
|
||||
"is-typedarray",
|
||||
"is-windows",
|
||||
"isarray",
|
||||
"isobject",
|
||||
"isstream",
|
||||
"jasmine",
|
||||
"jasmine-core",
|
||||
"jasminewd2",
|
||||
"json-schema",
|
||||
"json-schema-traverse",
|
||||
"json-stable-stringify",
|
||||
"json-stringify-safe",
|
||||
"jsprim",
|
||||
"kind-of",
|
||||
"long",
|
||||
"lru-cache",
|
||||
"map-cache",
|
||||
"map-visit",
|
||||
"math-random",
|
||||
"micromatch",
|
||||
"mime-db",
|
||||
"mime-types",
|
||||
"minimatch",
|
||||
"minimist",
|
||||
"mixin-deep",
|
||||
"nanomatch",
|
||||
"normalize-path",
|
||||
"oauth-sign",
|
||||
"object.omit",
|
||||
"object.pick",
|
||||
"object-copy",
|
||||
"object-visit",
|
||||
"once",
|
||||
"optimist",
|
||||
"options",
|
||||
"os-tmpdir",
|
||||
"parse-glob",
|
||||
"pascalcase",
|
||||
"path-dirname",
|
||||
"path-is-absolute",
|
||||
"performance-now",
|
||||
"posix-character-classes",
|
||||
"preserve",
|
||||
"process-nextick-args",
|
||||
"protobufjs",
|
||||
"protractor",
|
||||
"qs",
|
||||
"randomatic",
|
||||
"readable-stream",
|
||||
"readdirp",
|
||||
"reflect-metadata",
|
||||
"regex-cache",
|
||||
"regex-not",
|
||||
"remove-trailing-separator",
|
||||
"repeat-element",
|
||||
"repeat-string",
|
||||
"request",
|
||||
"ret",
|
||||
"rimraf",
|
||||
"safe-buffer",
|
||||
"safe-regex",
|
||||
"sax",
|
||||
"semver",
|
||||
"set-immediate-shim",
|
||||
"set-value",
|
||||
"shelljs",
|
||||
"sigmund",
|
||||
"snapdragon",
|
||||
"snapdragon-node",
|
||||
"snapdragon-util",
|
||||
"source-map",
|
||||
"source-map-resolve",
|
||||
"source-map-support",
|
||||
"source-map-url",
|
||||
"split-string",
|
||||
"sshpk",
|
||||
"static-extend",
|
||||
"stringstream",
|
||||
"tmp",
|
||||
"to-object-path",
|
||||
"to-regex",
|
||||
"to-regex-range",
|
||||
"tough-cookie",
|
||||
"tsickle",
|
||||
"tslib",
|
||||
"tsutils",
|
||||
"tunnel-agent",
|
||||
"typescript",
|
||||
"union-value",
|
||||
"unset-value",
|
||||
"upath",
|
||||
"uri-js",
|
||||
"urix",
|
||||
"use",
|
||||
"util-deprecate",
|
||||
"uuid",
|
||||
"verror",
|
||||
"webdriver-js-extender",
|
||||
"webdriver-manager",
|
||||
"wordwrap",
|
||||
"wrappy",
|
||||
"xhr2",
|
||||
"xml2js",
|
||||
"xmlbuilder",
|
||||
"zone.js",
|
||||
"@angular-devkit/core",
|
||||
"@angular-devkit/schematics",
|
||||
"@types",
|
||||
"@webcomponents/custom-elements",
|
||||
],
|
||||
patterns = [
|
||||
"node_modules/protractor/**",
|
||||
"node_modules/@schematics/angular/**",
|
||||
],
|
||||
actual = "@angular_deps//:node_modules",
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "web_test_bootstrap_scripts",
|
||||
# do not sort
|
||||
srcs = [
|
||||
"//:node_modules/reflect-metadata/Reflect.js",
|
||||
"//:node_modules/zone.js/dist/zone.js",
|
||||
"//:node_modules/zone.js/dist/zone-testing.js",
|
||||
"//:node_modules/zone.js/dist/task-tracking.js",
|
||||
"@angular_deps//:node_modules/reflect-metadata/Reflect.js",
|
||||
"@angular_deps//:node_modules/zone.js/dist/zone.js",
|
||||
"@angular_deps//:node_modules/zone.js/dist/zone-testing.js",
|
||||
"@angular_deps//:node_modules/zone.js/dist/task-tracking.js",
|
||||
"//:test-events.js",
|
||||
],
|
||||
)
|
||||
@ -236,9 +35,11 @@ filegroup(
|
||||
filegroup(
|
||||
name = "angularjs_scripts",
|
||||
srcs = [
|
||||
"//:node_modules/angular-1.5/angular.js",
|
||||
"//:node_modules/angular-mocks-1.5/angular-mocks.js",
|
||||
"//:node_modules/angular-mocks/angular-mocks.js",
|
||||
"//:node_modules/angular/angular.js",
|
||||
"@angular_deps//:node_modules/angular-1.5/angular.js",
|
||||
"@angular_deps//:node_modules/angular-1.6/angular.js",
|
||||
"@angular_deps//:node_modules/angular-mocks-1.5/angular-mocks.js",
|
||||
"@angular_deps//:node_modules/angular-mocks-1.6/angular-mocks.js",
|
||||
"@angular_deps//:node_modules/angular-mocks/angular-mocks.js",
|
||||
"@angular_deps//:node_modules/angular/angular.js",
|
||||
],
|
||||
)
|
||||
|
28
CHANGELOG.md
28
CHANGELOG.md
@ -1,3 +1,13 @@
|
||||
<a name="6.1.1"></a>
|
||||
## [6.1.1](https://github.com/angular/angular/compare/6.1.0...6.1.1) (2018-08-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **compiler-cli:** correct tsickle dependency version to fix typescript 2.9 compatibility ([fec29fa](https://github.com/angular/angular/commit/317c7087c56b72aa74cd6d6a8f719e6e7fec29fa))
|
||||
|
||||
|
||||
|
||||
<a name="6.1.0"></a>
|
||||
# [6.1.0](https://github.com/angular/angular/compare/6.0.0-rc.5...6.1.0) (2018-07-25)
|
||||
|
||||
@ -16,26 +26,19 @@
|
||||
* **common:** format fractional seconds ([#24844](https://github.com/angular/angular/issues/24844)) ([0b4d85e](https://github.com/angular/angular/commit/0b4d85e)), closes [#24831](https://github.com/angular/angular/issues/24831)
|
||||
* **common:** properly update collection reference in NgForOf ([#24684](https://github.com/angular/angular/issues/24684)) ([ff84c5c](https://github.com/angular/angular/commit/ff84c5c)), closes [#24155](https://github.com/angular/angular/issues/24155)
|
||||
* **common:** use correct currency format for locale de-AT ([#24658](https://github.com/angular/angular/issues/24658)) ([dcabb05](https://github.com/angular/angular/commit/dcabb05)), closes [#24609](https://github.com/angular/angular/issues/24609)
|
||||
* **common:** do not round factional seconds ([#24831](https://github.com/angular/angular/issues/24831)) ([a527c69](https://github.com/angular/angular/commit/a527c69)), closes [#24384](https://github.com/angular/angular/issues/24384)
|
||||
* **common:** properly update collection reference in NgForOf ([#24684](https://github.com/angular/angular/issues/24684)) ([ff84c5c](https://github.com/angular/angular/commit/ff84c5c)), closes [#24155](https://github.com/angular/angular/issues/24155)
|
||||
* **common:** use correct currency format for locale de-AT ([#24658](https://github.com/angular/angular/issues/24658)) ([dcabb05](https://github.com/angular/angular/commit/dcabb05)), closes [#24609](https://github.com/angular/angular/issues/24609)
|
||||
* **common:** use correct ICU plural for locale mk ([#24659](https://github.com/angular/angular/issues/24659)) ([64a8584](https://github.com/angular/angular/commit/64a8584))
|
||||
* **compiler:** fix a few non-tree-shakeable code patterns ([#24677](https://github.com/angular/angular/issues/24677)) ([50d4a4f](https://github.com/angular/angular/commit/50d4a4f))
|
||||
* **compiler:** i18n_extractor now outputs the correct source file name ([#24885](https://github.com/angular/angular/issues/24885)) ([c8ad965](https://github.com/angular/angular/commit/c8ad965)), closes [#24884](https://github.com/angular/angular/issues/24884)
|
||||
* **compiler:** fix a few non-tree-shakeable code patterns ([#24677](https://github.com/angular/angular/issues/24677)) ([50d4a4f](https://github.com/angular/angular/commit/50d4a4f))
|
||||
* **compiler:** support `.` in import statements. ([#20634](https://github.com/angular/angular/issues/20634)) ([d8f7b29](https://github.com/angular/angular/commit/d8f7b29)), closes [#20363](https://github.com/angular/angular/issues/20363)
|
||||
* **compiler:** avoid a crash in ngc-wrapped. ([#23468](https://github.com/angular/angular/issues/23468)) ([e1c4930](https://github.com/angular/angular/commit/e1c4930))
|
||||
* **compiler:** generate constant array for i18n attributes ([#23837](https://github.com/angular/angular/issues/23837)) ([cfde36d](https://github.com/angular/angular/commit/cfde36d))
|
||||
* **compiler:** generate core-compliant hostBindings property ([#24087](https://github.com/angular/angular/issues/24087)) ([01b5acd](https://github.com/angular/angular/commit/01b5acd)), closes [#24013](https://github.com/angular/angular/issues/24013)
|
||||
* **compiler:** handle undefined annotation metadata ([#23349](https://github.com/angular/angular/issues/23349)) ([ca776c5](https://github.com/angular/angular/commit/ca776c5))
|
||||
* **compiler-cli:** Use typescript to resolve modules for metadata ([#22856](https://github.com/angular/angular/issues/22856)) ([0d5f2d3](https://github.com/angular/angular/commit/0d5f2d3))
|
||||
* **compiler-cli:** Use typescript to resolve modules for metadata ([#22856](https://github.com/angular/angular/issues/22856)) ([0d5f2d3](https://github.com/angular/angular/commit/0d5f2d3))
|
||||
* **compiler-cli:** don't rely on incompatible TS method ([#23550](https://github.com/angular/angular/issues/23550)) ([b1f040f](https://github.com/angular/angular/commit/b1f040f))
|
||||
* **core:** stop reusing provider definitions across NgModuleRef instances ([#25022](https://github.com/angular/angular/issues/25022)) ([6b859da](https://github.com/angular/angular/commit/6b859da)), closes [#25018](https://github.com/angular/angular/issues/25018)
|
||||
* **core:** mark NgModule as not the root if APP_ROOT is set to false ([#24814](https://github.com/angular/angular/issues/24814)) ([1089261](https://github.com/angular/angular/commit/1089261))
|
||||
* **core:** use addCustomEqualityTester instead of overriding toEqual ([#22983](https://github.com/angular/angular/issues/22983)) ([0922228](https://github.com/angular/angular/commit/0922228)), closes [#22939](https://github.com/angular/angular/issues/22939)
|
||||
* **core:** mark NgModule as not the root if APP_ROOT is set to false ([#24814](https://github.com/angular/angular/issues/24814)) ([1089261](https://github.com/angular/angular/commit/1089261))
|
||||
* **core:** use addCustomEqualityTester instead of overriding toEqual ([#22983](https://github.com/angular/angular/issues/22983)) ([0922228](https://github.com/angular/angular/commit/0922228)), closes [#22939](https://github.com/angular/angular/issues/22939)
|
||||
* **core:** Injector correctly honors the @Self flag ([#24520](https://github.com/angular/angular/issues/24520)) ([ccbda9d](https://github.com/angular/angular/commit/ccbda9d))
|
||||
* **core:** avoid eager providers re-initialization ([#23559](https://github.com/angular/angular/issues/23559)) ([0c6dc45](https://github.com/angular/angular/commit/0c6dc45))
|
||||
* **core:** call ngOnDestroy on all services that have it ([#23755](https://github.com/angular/angular/issues/23755)) ([fc03427](https://github.com/angular/angular/commit/fc03427)), closes [#22466](https://github.com/angular/angular/issues/22466) [#22240](https://github.com/angular/angular/issues/22240) [#14818](https://github.com/angular/angular/issues/14818)
|
||||
@ -44,10 +47,6 @@
|
||||
* **elements:** prevent closure renaming of platform properties ([#23843](https://github.com/angular/angular/issues/23843)) ([d4b8b24](https://github.com/angular/angular/commit/d4b8b24))
|
||||
* **forms:** properly handle special properties in FormGroup.get ([#22249](https://github.com/angular/angular/issues/22249)) ([9367e91](https://github.com/angular/angular/commit/9367e91)), closes [#17195](https://github.com/angular/angular/issues/17195)
|
||||
* **language-service:** do not overwrite native `Reflect` ([#24299](https://github.com/angular/angular/issues/24299)) ([6881404](https://github.com/angular/angular/commit/6881404)), closes [#21420](https://github.com/angular/angular/issues/21420)
|
||||
* **language-service:** do not overwrite native `Reflect` ([#24299](https://github.com/angular/angular/issues/24299)) ([6881404](https://github.com/angular/angular/commit/6881404)), closes [#21420](https://github.com/angular/angular/issues/21420)
|
||||
* **platform-browser:** add missing deps for HammerGesturesPlugin ([#24682](https://github.com/angular/angular/issues/24682)) ([13d60ea](https://github.com/angular/angular/commit/13d60ea))
|
||||
* **platform-browser:** mark Meta and Title services as tree shakable providers ([#24815](https://github.com/angular/angular/issues/24815)) ([197387d](https://github.com/angular/angular/commit/197387d))
|
||||
* **platform-browser:** workaround wrong import path generated by ngc for DOCUMENT ([#24830](https://github.com/angular/angular/issues/24830)) ([7d27ecc](https://github.com/angular/angular/commit/7d27ecc))
|
||||
* **platform-browser:** add missing deps for HammerGesturesPlugin ([#24682](https://github.com/angular/angular/issues/24682)) ([13d60ea](https://github.com/angular/angular/commit/13d60ea))
|
||||
* **platform-browser:** mark Meta and Title services as tree shakable providers ([#24815](https://github.com/angular/angular/issues/24815)) ([197387d](https://github.com/angular/angular/commit/197387d))
|
||||
* **platform-browser:** workaround wrong import path generated by ngc for DOCUMENT ([#24830](https://github.com/angular/angular/issues/24830)) ([7d27ecc](https://github.com/angular/angular/commit/7d27ecc))
|
||||
@ -57,14 +56,12 @@
|
||||
* **platform-server:** provide Domino DOM types globally ([#24116](https://github.com/angular/angular/issues/24116)) ([c73196e](https://github.com/angular/angular/commit/c73196e)), closes [#23280](https://github.com/angular/angular/issues/23280) [#23133](https://github.com/angular/angular/issues/23133)
|
||||
* **router:** Fix _lastPathIndex in deeply nested empty paths ([#22394](https://github.com/angular/angular/issues/22394)) ([968f153](https://github.com/angular/angular/commit/968f153))
|
||||
* **router:** add ability to recover from malformed url ([#23283](https://github.com/angular/angular/issues/23283)) ([86d254d](https://github.com/angular/angular/commit/86d254d)), closes [#21468](https://github.com/angular/angular/issues/21468)
|
||||
* **router:** add ability to recover from malformed url ([#23283](https://github.com/angular/angular/issues/23283)) ([86d254d](https://github.com/angular/angular/commit/86d254d)), closes [#21468](https://github.com/angular/angular/issues/21468)
|
||||
* **router:** fix lazy loading of aux routes ([#23459](https://github.com/angular/angular/issues/23459)) ([5731d07](https://github.com/angular/angular/commit/5731d07)), closes [#10981](https://github.com/angular/angular/issues/10981)
|
||||
* **router:** avoid freezing queryParams in-place ([#22663](https://github.com/angular/angular/issues/22663)) ([89f64e5](https://github.com/angular/angular/commit/89f64e5)), closes [#22617](https://github.com/angular/angular/issues/22617)
|
||||
* **router:** cache route handle if found ([#22475](https://github.com/angular/angular/issues/22475)) ([4cfa571](https://github.com/angular/angular/commit/4cfa571)), closes [#22474](https://github.com/angular/angular/issues/22474)
|
||||
* **router:** correct the segment parsing so it won't break on ampersand ([#23684](https://github.com/angular/angular/issues/23684)) ([553a680](https://github.com/angular/angular/commit/553a680))
|
||||
* **service-worker:** don't include sourceMappingURL in ngsw-worker ([#24877](https://github.com/angular/angular/issues/24877)) ([8620373](https://github.com/angular/angular/commit/8620373)), closes [#23596](https://github.com/angular/angular/issues/23596)
|
||||
* **service-worker:** avoid network requests when looking up hashed resources in cache ([#24127](https://github.com/angular/angular/issues/24127)) ([52d43a9](https://github.com/angular/angular/commit/52d43a9))
|
||||
* **service-worker:** avoid network requests when looking up hashed resources in cache ([#24127](https://github.com/angular/angular/issues/24127)) ([52d43a9](https://github.com/angular/angular/commit/52d43a9))
|
||||
* **service-worker:** fix `SwPush.unsubscribe()` ([#24162](https://github.com/angular/angular/issues/24162)) ([3ed2d75](https://github.com/angular/angular/commit/3ed2d75)), closes [#24095](https://github.com/angular/angular/issues/24095)
|
||||
* **service-worker:** add badge to NOTIFICATION_OPTION_NAMES ([#23241](https://github.com/angular/angular/issues/23241)) ([fb59b2d](https://github.com/angular/angular/commit/fb59b2d)), closes [#23196](https://github.com/angular/angular/issues/23196)
|
||||
* **service-worker:** check platformBrowser before accessing navigator.serviceWorker ([#21231](https://github.com/angular/angular/issues/21231)) ([0bdd30e](https://github.com/angular/angular/commit/0bdd30e))
|
||||
@ -82,9 +79,6 @@
|
||||
* **core:** expose a Compiler API for accessing module ids from NgModule types ([#24258](https://github.com/angular/angular/issues/24258)) ([bd02b27](https://github.com/angular/angular/commit/bd02b27))
|
||||
* **core:** KeyValueDiffer#diff allows null values ([#24319](https://github.com/angular/angular/issues/24319)) ([52ce9d5](https://github.com/angular/angular/commit/52ce9d5))
|
||||
* **core:** add support for ShadowDOM v1 ([#24718](https://github.com/angular/angular/issues/24718)) ([3553977](https://github.com/angular/angular/commit/3553977))
|
||||
* **core:** add support for using async/await with Jasmine ([#24637](https://github.com/angular/angular/issues/24637)) ([71100e6](https://github.com/angular/angular/commit/71100e6))
|
||||
* **core:** add support for ShadowDOM v1 ([#24718](https://github.com/angular/angular/issues/24718)) ([3553977](https://github.com/angular/angular/commit/3553977))
|
||||
* **core:** add support for using async/await with Jasmine ([#24637](https://github.com/angular/angular/issues/24637)) ([71100e6](https://github.com/angular/angular/commit/71100e6))
|
||||
(https://github.com/angular/angular/commit/328971f)), closes [#24616](https://github.com/angular/angular/issues/24616)
|
||||
* **platform-browser:** add HammerJS lazy-loader symbols to public API ([#23943](https://github.com/angular/angular/issues/23943)) ([26fbf1d](https://github.com/angular/angular/commit/26fbf1d))
|
||||
* **platform-browser:** allow lazy-loading HammerJS ([#23906](https://github.com/angular/angular/issues/23906)) ([313bdce](https://github.com/angular/angular/commit/313bdce))
|
||||
@ -247,7 +241,6 @@ To learn about the release highlights and our new CLI-powered update workflow fo
|
||||
* **animations:** only use the WA-polyfill alongside AnimationBuilder ([#22143](https://github.com/angular/angular/issues/22143)) ([b2f366b](https://github.com/angular/angular/commit/b2f366b)), closes [#17496](https://github.com/angular/angular/issues/17496)
|
||||
* **animations:** expose `element` and `params` within transition matchers ([#22693](https://github.com/angular/angular/issues/22693)) ([58b94e6](https://github.com/angular/angular/commit/58b94e6))
|
||||
* **common:** better error message when non-template element used in NgIf ([#22274](https://github.com/angular/angular/issues/22274)) ([67cf11d](https://github.com/angular/angular/commit/67cf11d)), closes [#16410](https://github.com/angular/angular/issues/16410)
|
||||
* **common:** better error message when non-template element used in NgIf ([#22274](https://github.com/angular/angular/issues/22274)) ([67cf11d](https://github.com/angular/angular/commit/67cf11d)), closes [#16410](https://github.com/angular/angular/issues/16410)
|
||||
* **common:** export functions to format numbers, percents, currencies & dates ([#22423](https://github.com/angular/angular/issues/22423)) ([4180912](https://github.com/angular/angular/commit/4180912)), closes [#20536](https://github.com/angular/angular/issues/20536)
|
||||
* **compiler:** lower @NgModule ids if needed ([#23031](https://github.com/angular/angular/issues/23031)) ([bd024c0](https://github.com/angular/angular/commit/bd024c0))
|
||||
* **compiler:** implement "enableIvy" compiler option ([#21427](https://github.com/angular/angular/issues/21427)) ([64d16de](https://github.com/angular/angular/commit/64d16de))
|
||||
@ -287,7 +280,6 @@ To learn about the release highlights and our new CLI-powered update workflow fo
|
||||
* **animations:** report correct totalTime value even during noOp animations ([#22225](https://github.com/angular/angular/issues/22225)) ([e1bf067](https://github.com/angular/angular/commit/e1bf067))
|
||||
* **animations:** avoid animation insertions during router back/refresh ([#21977](https://github.com/angular/angular/issues/21977)) ([f88fba0](https://github.com/angular/angular/commit/f88fba0)), closes [#19712](https://github.com/angular/angular/issues/19712)
|
||||
* **animations:** treat numeric state name values as strings ([#22923](https://github.com/angular/angular/issues/22923)) ([e5e1b0d](https://github.com/angular/angular/commit/e5e1b0d))
|
||||
* **animations:** report correct totalTime value even during noOp animations ([#22225](https://github.com/angular/angular/issues/22225)) ([e1bf067](https://github.com/angular/angular/commit/e1bf067))
|
||||
* **animations:** fix increment/decrement aliases example ([#18323](https://github.com/angular/angular/issues/18323)) ([d2aa8ac](https://github.com/angular/angular/commit/d2aa8ac))
|
||||
* **common:** NgClass should properly take className changes into account ([#21937](https://github.com/angular/angular/issues/21937)) ([4a42669](https://github.com/angular/angular/commit/4a42669)), closes [#21932](https://github.com/angular/angular/issues/21932)
|
||||
* **common:** fix the titlecase pipe ([#22600](https://github.com/angular/angular/issues/22600)) ([7966744](https://github.com/angular/angular/commit/7966744))
|
||||
|
40
WORKSPACE
40
WORKSPACE
@ -6,9 +6,9 @@ workspace(name = "angular")
|
||||
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
url = "https://github.com/bazelbuild/rules_nodejs/archive/0.10.1.zip",
|
||||
strip_prefix = "rules_nodejs-0.10.1",
|
||||
sha256 = "634206524d90dc03c52392fa3f19a16637d2bcf154910436fe1d669a0d9d7b9c",
|
||||
url = "https://github.com/bazelbuild/rules_nodejs/archive/20ff5892612f8359aec8aaf26dd3902a24976ada.zip",
|
||||
strip_prefix = "rules_nodejs-20ff5892612f8359aec8aaf26dd3902a24976ada",
|
||||
sha256 = "07da9d4c3e688a02745d0f50709a87744706d4f5d1959b799b0ac38e97acd622",
|
||||
)
|
||||
|
||||
http_archive(
|
||||
@ -71,6 +71,22 @@ http_archive(
|
||||
sha256 = "8a517806d2b7c8505ba5c53934e7d7c70d341b68ffd268e9044d35b564a48828",
|
||||
)
|
||||
|
||||
#
|
||||
# Point Bazel to WORKSPACEs that live in subdirectories
|
||||
#
|
||||
|
||||
local_repository(
|
||||
name = "rxjs",
|
||||
path = "node_modules/rxjs/src",
|
||||
)
|
||||
|
||||
# Point to the integration test workspace just so that Bazel doesn't descend into it
|
||||
# when expanding the //... pattern
|
||||
local_repository(
|
||||
name = "bazel_integration_test",
|
||||
path = "integration/bazel",
|
||||
)
|
||||
|
||||
#
|
||||
# Load and install our dependencies downloaded above.
|
||||
#
|
||||
@ -100,26 +116,10 @@ load("@build_bazel_rules_typescript//:defs.bzl", "ts_setup_workspace")
|
||||
|
||||
ts_setup_workspace()
|
||||
|
||||
load("//packages/bazel/src:ng_setup_workspace.bzl", "ng_setup_workspace")
|
||||
load("@angular//:index.bzl", "ng_setup_workspace")
|
||||
|
||||
ng_setup_workspace()
|
||||
|
||||
#
|
||||
# Point Bazel to WORKSPACEs that live in subdirectories
|
||||
#
|
||||
|
||||
local_repository(
|
||||
name = "rxjs",
|
||||
path = "node_modules/rxjs/src",
|
||||
)
|
||||
|
||||
# Point to the integration test workspace just so that Bazel doesn't descend into it
|
||||
# when expanding the //... pattern
|
||||
local_repository(
|
||||
name = "bazel_integration_test",
|
||||
path = "integration/bazel",
|
||||
)
|
||||
|
||||
#
|
||||
# Ask Bazel to manage these toolchain dependencies for us.
|
||||
# Bazel will run `yarn install` when one of these toolchains is requested during
|
||||
|
@ -43,6 +43,17 @@ Here are the most important tasks you might need to use:
|
||||
|
||||
* `yarn build-ie-polyfills` - generates a js file of polyfills that can be loaded in Internet Explorer.
|
||||
|
||||
## Developing on Windows
|
||||
The `packages/` directory may contain Linux-specific symlinks, which are not recognized by Windows.
|
||||
These unresolved links cause the docs generation process to fail because it cannot locate certain files.
|
||||
|
||||
> Hint: The following steps require administration rights or [Windows Developer Mode](https://docs.microsoft.com/en-us/windows/uwp/get-started/enable-your-device-for-development) enabled!
|
||||
|
||||
To fix this problem, run `scripts/windows/create-symlinks.sh`. This command creates temporary files where the symlinks used to be. Make sure not to commit those files with your documentation changes.
|
||||
When you are done making and testing your documentation changes, you can restore the original symlinks and delete the temporary files by running `scripts/windows/remove-symlinks.sh`.
|
||||
|
||||
It's necessary to remove the temporary files, because otherwise they're displayed as local changes in your git working copy and certain operations are blocked.
|
||||
|
||||
## Using ServiceWorker locally
|
||||
|
||||
Since abb36e3cb, running `yarn start --prod` will no longer set up the ServiceWorker, which
|
||||
|
@ -1,26 +1,38 @@
|
||||
import { ReflectiveInjector } from '@angular/core';
|
||||
import { Injector } from '@angular/core';
|
||||
|
||||
import { Car, Engine, Tires } from './car';
|
||||
import { Logger } from '../logger.service';
|
||||
|
||||
// #docregion injector
|
||||
export function useInjector() {
|
||||
let injector: ReflectiveInjector;
|
||||
let injector: Injector;
|
||||
// #enddocregion injector
|
||||
/*
|
||||
// #docregion injector-no-new
|
||||
// Cannot instantiate an ReflectiveInjector like this!
|
||||
let injector = new ReflectiveInjector([Car, Engine, Tires]);
|
||||
// Cannot instantiate an Injector like this!
|
||||
let injector = new Injector([
|
||||
{ provide: Car, deps: [Engine, Tires] },
|
||||
{ provide: Engine, deps: [] },
|
||||
{ provide: Tires, deps: [] }
|
||||
]);
|
||||
// #enddocregion injector-no-new
|
||||
*/
|
||||
// #docregion injector, injector-create-and-call
|
||||
injector = ReflectiveInjector.resolveAndCreate([Car, Engine, Tires]);
|
||||
injector = Injector.create({
|
||||
providers: [
|
||||
{ provide: Car, deps: [Engine, Tires] },
|
||||
{ provide: Engine, deps: [] },
|
||||
{ provide: Tires, deps: [] }
|
||||
]
|
||||
});
|
||||
// #docregion injector-call
|
||||
let car = injector.get(Car);
|
||||
// #enddocregion injector-call, injector-create-and-call
|
||||
car.description = 'Injector';
|
||||
|
||||
injector = ReflectiveInjector.resolveAndCreate([Logger]);
|
||||
injector = Injector.create({
|
||||
providers: [{ provide: Logger, deps: [] }]
|
||||
});
|
||||
let logger = injector.get(Logger);
|
||||
logger.log('Injector car.drive() said: ' + car.drive());
|
||||
return car;
|
||||
|
9
aio/content/examples/elements/stackblitz.json
Normal file
9
aio/content/examples/elements/stackblitz.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"description": "Angular Elements",
|
||||
"files":[
|
||||
"!**/*.d.ts",
|
||||
"!**/*.js",
|
||||
"!**/*.[1].*"
|
||||
],
|
||||
"tags":["cookbook"]
|
||||
}
|
@ -1,15 +1,14 @@
|
||||
// #docplaster
|
||||
// #docregion app-module
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
// import the feature module here so you can add it to the imports array below
|
||||
import { CustomerDashboardModule } from './customer-dashboard/customer-dashboard.module';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
@ -17,7 +16,7 @@ import { CustomerDashboardModule } from './customer-dashboard/customer-dashboard
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
HttpClientModule,
|
||||
CustomerDashboardModule // add the feature module here
|
||||
],
|
||||
providers: [],
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@NgModule({
|
||||
@ -13,7 +13,7 @@ import { AppComponent } from './app.component';
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
HttpClientModule,
|
||||
AppRoutingModule
|
||||
],
|
||||
providers: [],
|
||||
|
@ -1,26 +1,21 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import {
|
||||
FlyingHeroesComponent,
|
||||
FlyingHeroesImpureComponent
|
||||
} from './flying-heroes.component';
|
||||
import { ExponentialStrengthPipe } from './exponential-strength.pipe';
|
||||
import { FetchJsonPipe } from './fetch-json.pipe';
|
||||
import { FlyingHeroesComponent, FlyingHeroesImpureComponent } from './flying-heroes.component';
|
||||
import { FlyingHeroesImpurePipe, FlyingHeroesPipe } from './flying-heroes.pipe';
|
||||
import { HeroAsyncMessageComponent } from './hero-async-message.component';
|
||||
import { HeroBirthdayComponent } from './hero-birthday1.component';
|
||||
import { HeroBirthday2Component } from './hero-birthday2.component';
|
||||
import { HeroListComponent } from './hero-list.component';
|
||||
import { PowerBoosterComponent } from './power-booster.component';
|
||||
import { PowerBoostCalculatorComponent } from './power-boost-calculator.component';
|
||||
import {
|
||||
FlyingHeroesPipe,
|
||||
FlyingHeroesImpurePipe
|
||||
} from './flying-heroes.pipe';
|
||||
import { FetchJsonPipe } from './fetch-json.pipe';
|
||||
import { ExponentialStrengthPipe } from './exponential-strength.pipe';
|
||||
import { PowerBoosterComponent } from './power-booster.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
@ -43,6 +38,6 @@ import { ExponentialStrengthPipe } from './exponential-strength.pipe';
|
||||
FetchJsonPipe,
|
||||
ExponentialStrengthPipe
|
||||
],
|
||||
bootstrap: [ AppComponent ]
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
|
@ -1,13 +1,14 @@
|
||||
// #docregion
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
|
||||
// #docregion pipe-metadata
|
||||
@Pipe({
|
||||
name: 'fetch',
|
||||
pure: false
|
||||
})
|
||||
// #enddocregion pipe-metadata
|
||||
export class FetchJsonPipe implements PipeTransform {
|
||||
export class FetchJsonPipe implements PipeTransform {
|
||||
private cachedData: any = null;
|
||||
private cachedUrl = '';
|
||||
|
||||
@ -17,7 +18,7 @@ export class FetchJsonPipe implements PipeTransform {
|
||||
if (url !== this.cachedUrl) {
|
||||
this.cachedData = null;
|
||||
this.cachedUrl = url;
|
||||
this.http.get(url).subscribe( result => this.cachedData = result );
|
||||
this.http.get(url).subscribe(result => this.cachedData = result);
|
||||
}
|
||||
|
||||
return this.cachedData;
|
||||
|
@ -19,7 +19,7 @@ If you use the CLI to generate an app, the default `AppModule` is as follows:
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@ -31,7 +31,7 @@ import { AppComponent } from './app.component';
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpModule
|
||||
HttpClientModule
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
@ -138,7 +138,7 @@ It tells Angular about other NgModules that this particular module needs to func
|
||||
This list of modules are those that export components, directives, or pipes
|
||||
that the component templates in this module reference. In this case, the component is
|
||||
`AppComponent`, which references components, directives, or pipes in `BrowserModule`,
|
||||
`FormsModule`, or `HttpModule`.
|
||||
`FormsModule`, or `HttpClientModule`.
|
||||
A component template can reference another component, directive,
|
||||
or pipe when the referenced class is declared in this module or
|
||||
the class was imported from another module.
|
||||
|
@ -44,6 +44,9 @@ is available to <code>declarations</code> of this module.</p>
|
||||
<td><p>List of dependency injection providers visible both to the contents of this module and to importers of this module.</p>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td><code><b>entryComponents:</b> [SomeComponent, OtherComponent]</code></td>
|
||||
<td><p>List of components not referenced in any reachable template, for example dynamically created from code.</p></td>
|
||||
</tr><tr>
|
||||
<td><code><b>bootstrap:</b> [MyAppComponent]</code></td>
|
||||
<td><p>List of components to bootstrap when this module is bootstrapped.</p>
|
||||
</td>
|
||||
|
@ -692,7 +692,7 @@ If the factory function needs access to other DI tokens, it can use the inject f
|
||||
const TOKEN =
|
||||
new InjectionToken('tree-shakeable token',
|
||||
{ providedIn: 'root', factory: () =>
|
||||
new AppConfig(inject(Parameter1), inject(Paremeter2)), });
|
||||
new AppConfig(inject(Parameter1), inject(Parameter2)), });
|
||||
</code-example>
|
||||
|
||||
{@a optional}
|
||||
|
@ -3,25 +3,25 @@
|
||||
_Angular elements_ are Angular components packaged as _custom elements_, a web standard for defining new HTML elements in a framework-agnostic way.
|
||||
|
||||
[Custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) are a Web Platform feature currently supported by Chrome, Opera, and Safari, and available in other browsers through polyfills (see [Browser Support](#browser-support)).
|
||||
A custom element extends HTML by allowing you to define a tag whose content is created and controlled by JavaScript code.
|
||||
A custom element extends HTML by allowing you to define a tag whose content is created and controlled by JavaScript code.
|
||||
The browser maintains a `CustomElementRegistry` of defined custom elements (also called Web Components), which maps an instantiable JavaScript class to an HTML tag.
|
||||
|
||||
The `@angular/elements` package exports a `createCustomElement()` API that provides a bridge from Angular's component interface and change detection functionality to the built-in DOM API.
|
||||
The `@angular/elements` package exports a `createCustomElement()` API that provides a bridge from Angular's component interface and change detection functionality to the built-in DOM API.
|
||||
|
||||
Transforming a component to a custom element makes all of the required Angular infrastructure available to the browser.
|
||||
Creating a custom element is simple and straightforward, and automatically connects your component-defined view with change detection and data binding, mapping Angular functionality to the corresponding native HTML equivalents.
|
||||
Transforming a component to a custom element makes all of the required Angular infrastructure available to the browser.
|
||||
Creating a custom element is simple and straightforward, and automatically connects your component-defined view with change detection and data binding, mapping Angular functionality to the corresponding native HTML equivalents.
|
||||
|
||||
<div class="alert is-helpful">
|
||||
|
||||
We are working on custom elements that can be used by web apps built on other frameworks.
|
||||
A minimal, self-contained version of the Angular framework will be injected as a service to support the component's change-detection and data-binding functionality.
|
||||
We are working on custom elements that can be used by web apps built on other frameworks.
|
||||
A minimal, self-contained version of the Angular framework will be injected as a service to support the component's change-detection and data-binding functionality.
|
||||
For more about the direction of development, check out this [video presentation](https://www.youtube.com/watch?v=Z1gLFPLVJjY&t=4s).
|
||||
|
||||
</div>
|
||||
|
||||
## Using custom elements
|
||||
|
||||
Custom elements bootstrap themselves - they start automatically when they are added to the DOM, and are automatically destroyed when removed from the DOM. Once a custom element is added to the DOM for any page, it looks and behaves like any other HTML element, and does not require any special knowledge of Angular terms or usage conventions.
|
||||
Custom elements bootstrap themselves - they start automatically when they are added to the DOM, and are automatically destroyed when removed from the DOM. Once a custom element is added to the DOM for any page, it looks and behaves like any other HTML element, and does not require any special knowledge of Angular terms or usage conventions.
|
||||
|
||||
- <b>Easy dynamic content in an Angular app</b>
|
||||
|
||||
@ -33,14 +33,14 @@ Custom elements bootstrap themselves - they start automatically when they are ad
|
||||
|
||||
### How it works
|
||||
|
||||
Use the `createCustomElement()` function to convert a component into a class that can be registered with the browser as a custom element.
|
||||
After you register your configured class with the browser's custom-element registry, you can use the new element just like a built-in HTML element in content that you add directly into the DOM:
|
||||
Use the `createCustomElement()` function to convert a component into a class that can be registered with the browser as a custom element.
|
||||
After you register your configured class with the browser's custom-element registry, you can use the new element just like a built-in HTML element in content that you add directly into the DOM:
|
||||
|
||||
```
|
||||
<my-popup message="Use Angular!"></my-popup>
|
||||
```
|
||||
|
||||
When your custom element is placed on a page, the browser creates an instance of the registered class and adds it to the DOM. The content is provided by the component's template, which uses Angular template syntax, and is rendered using the component and DOM data. Input properties in the component correspond to input attributes for the element.
|
||||
When your custom element is placed on a page, the browser creates an instance of the registered class and adds it to the DOM. The content is provided by the component's template, which uses Angular template syntax, and is rendered using the component and DOM data. Input properties in the component correspond to input attributes for the element.
|
||||
|
||||
<figure>
|
||||
|
||||
@ -52,25 +52,25 @@ When your custom element is placed on a page, the browser creates an instance of
|
||||
|
||||
## Transforming components to custom elements
|
||||
|
||||
Angular provides the `createCustomElement()` function for converting an Angular component,
|
||||
together with its dependencies, to a custom element. The function collects the component's
|
||||
observable properties, along with the Angular functionality the browser needs to
|
||||
create and destroy instances, and to detect and respond to changes.
|
||||
Angular provides the `createCustomElement()` function for converting an Angular component,
|
||||
together with its dependencies, to a custom element. The function collects the component's
|
||||
observable properties, along with the Angular functionality the browser needs to
|
||||
create and destroy instances, and to detect and respond to changes.
|
||||
|
||||
The conversion process implements the `NgElementConstructor` interface, and creates a
|
||||
constructor class that is configured to produce a self-bootstrapping instance of your component.
|
||||
The conversion process implements the `NgElementConstructor` interface, and creates a
|
||||
constructor class that is configured to produce a self-bootstrapping instance of your component.
|
||||
|
||||
Use a JavaScript function, `customElements.define()`, to register the configured constructor
|
||||
and its associated custom-element tag with the browser's `CustomElementRegistry`.
|
||||
Use a JavaScript function, `customElements.define()`, to register the configured constructor
|
||||
and its associated custom-element tag with the browser's `CustomElementRegistry`.
|
||||
When the browser encounters the tag for the registered element, it uses the constructor to create a custom-element instance.
|
||||
|
||||
<figure>
|
||||
|
||||
<img src="generated/images/guide/elements/createElement.png" alt="Transform a component to a custom element" class="left">
|
||||
<img src="generated/images/guide/elements/createElement.png" alt="Transform a component to a custom element" class="left">
|
||||
|
||||
</figure>
|
||||
|
||||
### Mapping
|
||||
### Mapping
|
||||
|
||||
A custom element _hosts_ an Angular component, providing a bridge between the data and logic defined in the component and standard DOM APIs. Component properties and logic maps directly into HTML attributes and the browser's event system.
|
||||
|
||||
@ -80,13 +80,13 @@ A custom element _hosts_ an Angular component, providing a bridge between the da
|
||||
|
||||
|
||||
For more information, see Web Component documentation for [Creating custom events](https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events#Creating_custom_events).
|
||||
|
||||
|
||||
|
||||
{@a browser-support}
|
||||
|
||||
## Browser support for custom elements
|
||||
|
||||
The recently-developed [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) Web Platform feature is currently supported natively in a number of browsers. Support is pending or planned in other browsers.
|
||||
The recently-developed [custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) Web Platform feature is currently supported natively in a number of browsers. Support is pending or planned in other browsers.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@ -111,7 +111,7 @@ The recently-developed [custom elements](https://developer.mozilla.org/en-US/doc
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Edge</td>
|
||||
<td>Working on an implementation. <br>
|
||||
<td>Working on an implementation. <br>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
@ -120,7 +120,7 @@ The recently-developed [custom elements](https://developer.mozilla.org/en-US/doc
|
||||
In browsers that support Custom Elements natively, the specification requires developers use ES2015 classes to define Custom Elements - developers can opt-in to this by setting the `target: "es2015"` property in their project's `tsconfig.json`. As Custom Element and ES2015 support may not be available in all browsers, developers can instead choose to use a polyfill to support older browsers and ES5 code.
|
||||
|
||||
Use the [Angular CLI](https://cli.angular.io/) to automatically set up your project with the correct polyfill: `ng add @angular/elements --name=*your_project_name*`.
|
||||
- For more information about polyfills, see [polyfill documentation](https://www.webcomponents.org/polyfills).
|
||||
- For more information about polyfills, see [polyfill documentation](https://www.webcomponents.org/polyfills).
|
||||
|
||||
- For more information about Angular browser support, see [Browser Support](guide/browser-support).
|
||||
|
||||
@ -131,12 +131,12 @@ Previously, when you wanted to add a component to an app at runtime, you had to
|
||||
|
||||
Using an Angular custom element makes the process much simpler and more transparent, by providing all of the infrastructure and framework automatically—all you have to do is define the kind of event handling you want. (You do still have to exclude the component from compilation, if you are not going to use it in your app.)
|
||||
|
||||
The Popup Service example app defines a component that you can either load dynamically or convert to a custom element.
|
||||
The Popup Service example app (shown below) defines a component that you can either load dynamically or convert to a custom element.
|
||||
|
||||
- `popup.component.ts` defines a simple pop-up element that displays an input message, with some animation and styling.
|
||||
- `popup.component.ts` defines a simple pop-up element that displays an input message, with some animation and styling.
|
||||
- `popup.service.ts` creates an injectable service that provides two different ways to invoke the PopupComponent; as a dynamic component, or as a custom element. Notice how much more setup is required for the dynamic-loading method.
|
||||
- `app.module.ts` adds the PopupComponent in the module's `entryComponents` list, to exclude it from compilation and avoid startup warnings or errors.
|
||||
- `app.component.ts` defines the app's root component, which uses the PopupService to add the pop-up to the DOM at run time. When the app runs, the root component's constructor converts PopupComponent to a custom element.
|
||||
- `app.component.ts` defines the app's root component, which uses the PopupService to add the pop-up to the DOM at run time. When the app runs, the root component's constructor converts PopupComponent to a custom element.
|
||||
|
||||
For comparison, the demo shows both methods. One button adds the popup using the dynamic-loading method, and the other uses the custom element. You can see that the result is the same; only the preparation is different.
|
||||
|
||||
@ -158,3 +158,59 @@ For comparison, the demo shows both methods. One button adds the popup using the
|
||||
|
||||
</code-pane>
|
||||
</code-tabs>
|
||||
|
||||
<!--
|
||||
StackBlitz transpiles code to ES5. The live example will not work without a polyfill.
|
||||
Only offer a `.zip` to download for now.
|
||||
-->
|
||||
You can download the full code for the example <live-example downloadOnly>here</live-example>.
|
||||
|
||||
|
||||
## Typings for custom elements
|
||||
|
||||
Generic DOM APIs, such as `document.createElement()` or `document.querySelector()`, return an element type that is appropriate for the specified arguments. For example, calling `document.createElement('a')` will return an `HTMLAnchorElement`, which TypeScript knows has an `href` property. Similarly, `document.createElement('div')` will return an `HTMLDivElement`, which TypeScript knows has no `href` property.
|
||||
|
||||
When called with unknown elements, such as a custom element name (`popup-element` in our example), the methods will return a generic type, such as `HTMLELement`, since TypeScript can't infer the correct type of the returned element.
|
||||
|
||||
Custom elements created with Angular extend `NgElement` (which in turn extends `HTMLElement`). Additionally, these custom elements will have a property for each input of the corresponding component. For example, our `popup-element` will have a `message` property of type `string`.
|
||||
|
||||
There are a few options if you want to get correct types for your custom elements. Let's assume you create a `my-dialog` custom element based on the following component:
|
||||
|
||||
```ts
|
||||
@Component(...)
|
||||
class MyDialog {
|
||||
@Input() content: string;
|
||||
}
|
||||
```
|
||||
|
||||
The most straight forward way to get accurate typings is to cast the return value of the relevant DOM methods to the correct type. For that, you can use the `NgElement` and `WithProperties` types (both exported from `@angular/elements`):
|
||||
|
||||
```ts
|
||||
const aDialog = document.createElement('my-dialog') as NgElement & WithProperties<{content: string}>;
|
||||
aDialog.content = 'Hello, world!';
|
||||
aDialog.content = 123; // <-- ERROR: TypeScript knows this should be a string.
|
||||
aDialog.body = 'News'; // <-- ERROR: TypeScript knows there is no `body` property on `aDialog`.
|
||||
```
|
||||
|
||||
This is a good way to quickly get TypeScript features, such as type checking and autocomplete support, for you custom element. But it can get cumbersome if you need it in several places, because you have to cast the return type on every occurrence.
|
||||
|
||||
An alternative way, that only requires defining each custom element's type once, is augmenting the `HTMLELementTagNameMap`, which TypeScript uses to infer the type of a returned element based on its tag name (for DOM methods such as `document.createElement()`, `document.querySelector()`, etc.):
|
||||
|
||||
```ts
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'my-dialog': NgElement & WithProperties<{content: string}>;
|
||||
'my-other-element': NgElement & WithProperties<{foo: 'bar'}>;
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Now, TypeScript can infer the correct type the same way it does for built-in elements:
|
||||
|
||||
```ts
|
||||
document.createElement('div') //--> HTMLDivElement (built-in element)
|
||||
document.querySelector('foo') //--> Element (unknown element)
|
||||
document.createElement('my-dialog') //--> NgElement & WithProperties<{content: string}> (custom element)
|
||||
document.querySelector('my-other-element') //--> NgElement & WithProperties<{foo: 'bar'}> (custom element)
|
||||
```
|
||||
|
@ -36,7 +36,7 @@ The following is an example of specifying a bootstrapped component,
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpModule,
|
||||
HttpClientModule,
|
||||
AppRoutingModule
|
||||
],
|
||||
providers: [],
|
||||
|
@ -13,7 +13,7 @@ The sample application and all tests in this guide are available for inspection
|
||||
|
||||
## Setup
|
||||
|
||||
The Angular CLI downloads and install everything you need to test an Angular application with the [Jasmine test framework](http://jasmine.github.io/2.4/introduction.html).
|
||||
The Angular CLI downloads and install everything you need to test an Angular application with the [Jasmine test framework](https://jasmine.github.io/).
|
||||
|
||||
The project you create with the CLI is immediately ready to test.
|
||||
Just run this one CLI command:
|
||||
@ -920,7 +920,7 @@ so it is safe to call `TestBed.get()` as follows:
|
||||
<div class="alert is-helpful">
|
||||
|
||||
For a use case in which `TestBed.get()` does not work,
|
||||
see the section [_Override a component's providers_](#component-override), which
|
||||
see the [_Override component providers_](#component-override) section that
|
||||
explains when and why you must get the service from the component's injector instead.
|
||||
|
||||
</div>
|
||||
|
BIN
aio/content/images/bios/kevinyang.jpg
Normal file
BIN
aio/content/images/bios/kevinyang.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
@ -653,5 +653,15 @@
|
||||
"twitter": "elanathellama",
|
||||
"bio": "Elana is a Developer Relations intern on the Angular team at Google. She is working on migration paths from AngularJS to Angular and would love to chat about your experience with upgrading.",
|
||||
"group": "Angular"
|
||||
},
|
||||
|
||||
"kevinyang": {
|
||||
"name": "Kevin Yang",
|
||||
"picture": "kevinyang.jpg",
|
||||
"twitter": "chgc",
|
||||
"website": "https://blog.kevinyang.net/",
|
||||
"bio":
|
||||
"Kevin is a Angular Taiwan, Angular Girls Taiwan community organzier. He loves sharing knowledge with other developers through blogging, speaking, workshops.",
|
||||
"group": "GDE"
|
||||
}
|
||||
}
|
||||
|
@ -13,12 +13,6 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- ReactiveConf -->
|
||||
<tr>
|
||||
<th><a href="https://reactiveconf.com/" title="ReactiveConf">ReactiveConf</a></th>
|
||||
<td>Bratislava, Slovakia</td>
|
||||
<td>October 25, 2017</td>
|
||||
</tr>
|
||||
<!-- AngularConnect-->
|
||||
<tr>
|
||||
<th><a href="http://angularconnect.com" title="AngularConnect">AngularConnect</a></th>
|
||||
@ -61,6 +55,12 @@
|
||||
<td>Melbourne, Australia</td>
|
||||
<td>Jun 22, 2018</td>
|
||||
</tr>
|
||||
<!-- ReactiveConf -->
|
||||
<tr>
|
||||
<th><a href="https://reactiveconf.com/" title="ReactiveConf">ReactiveConf</a></th>
|
||||
<td>Bratislava, Slovakia</td>
|
||||
<td>October 29-31, 2018</td>
|
||||
</tr>
|
||||
<!-- AngularConnect-->
|
||||
<tr>
|
||||
<th><a href="http://angularconnect.com" title="AngularConnect">AngularConnect</a></th>
|
||||
|
@ -181,7 +181,7 @@
|
||||
"rev": true,
|
||||
"title": "Amexio Canvas Web Based Drag and Drop IDE by MetaMagic",
|
||||
"url": "https://amexio.tech/"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Tooling": {
|
||||
@ -317,7 +317,7 @@
|
||||
"url": "http://www.primefaces.org/primeng/"
|
||||
},
|
||||
"a3b": {
|
||||
"desc": "One of the first major UI frameworks to support Angular",
|
||||
"desc": "A professional grade library of Angular UI components written in TypeScript that includes our Data Grid, TreeView, Charts, Editors, DropDowns, DatePickers, and many more. Features include support for AOT compilation, Tree Shaking for high-performance, localization, and accessibility.",
|
||||
"logo": "",
|
||||
"rev": true,
|
||||
"title": "Kendo UI",
|
||||
@ -736,6 +736,12 @@
|
||||
"rev": true,
|
||||
"title": "Angular.Schule (German)",
|
||||
"url": "https://angular.schule/"
|
||||
},
|
||||
"strbrw": {
|
||||
"desc": "Angular and RxJS trainings, Code Reviews and consultancy. We help software engineers all over the world to create better web-applications...",
|
||||
"rev": true,
|
||||
"title": "StrongBrew",
|
||||
"url": "https://strongbrew.io/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,15 +89,8 @@ Registering the provider in the `@Injectable` metadata also allows Angular to op
|
||||
|
||||
<div class="alert is-helpful">
|
||||
|
||||
If you need to, you can register providers at different levels:
|
||||
in the `HeroesComponent`, in the `AppComponent`, in the `AppModule`.
|
||||
For instance, you could have told the CLI to provide the service at the module level automatically by appending `--module=app`.
|
||||
|
||||
<code-example language="sh" class="code-shell">
|
||||
ng generate service hero --module=app
|
||||
</code-example>
|
||||
|
||||
To learn more about providers and injectors, see the [Dependency Injection guide](guide/dependency-injection).
|
||||
To learn more about providers, see the [Providers section](guide/providers).
|
||||
To learn more about injectors, see the [Dependency Injection guide](guide/dependency-injection).
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -250,7 +250,7 @@ There are three significant differences from `getHeroes()`.
|
||||
|
||||
## Update heroes
|
||||
|
||||
Editing a hero's name in the _hero detail_ view.
|
||||
Edit a hero's name in the _hero detail_ view.
|
||||
As you type, the hero name updates the heading at the top of the page.
|
||||
But when you click the "go back button", the changes are lost.
|
||||
|
||||
@ -294,8 +294,7 @@ That header is in the `httpOptions` constant defined in the `HeroService`.
|
||||
region="http-options">
|
||||
</code-example>
|
||||
|
||||
Refresh the browser, change a hero name, save your change,
|
||||
and click the "go back" button.
|
||||
Refresh the browser, change a hero name and save your change. Navigating to the previous view is implemented in the `save()` method defined in `HeroDetailComponent`.
|
||||
The hero now appears in the list with the changed name.
|
||||
|
||||
## Add a new hero
|
||||
@ -440,7 +439,7 @@ Create a `HeroSearchComponent` with the CLI.
|
||||
ng generate component hero-search
|
||||
</code-example>
|
||||
|
||||
The CLI generates the three `HeroSearchComponent` and adds the component to the `AppModule' declarations
|
||||
The CLI generates the three `HeroSearchComponent` files and adds the component to the `AppModule` declarations
|
||||
|
||||
Replace the generated `HeroSearchComponent` _template_ with a text box and a list of matching search results like this.
|
||||
|
||||
|
@ -7,14 +7,15 @@
|
||||
<mat-toolbar color="primary" class="app-toolbar no-print" [class.transitioning]="isTransitioning">
|
||||
<mat-toolbar-row class="notification-container">
|
||||
<aio-notification
|
||||
icon="insert_comment"
|
||||
iconLabel="Announcement"
|
||||
buttonText="Learn More"
|
||||
actionUrl="https://blog.angular.io/version-6-0-0-of-angular-now-available-cc56b0efa7a4"
|
||||
notificationId="angular-v6-announcement"
|
||||
expirationDate="2018-07-01"
|
||||
[dismissOnContentClick]="true"
|
||||
(dismissed)="notificationDismissed()">
|
||||
Version 6 of Angular Now Available!
|
||||
<a href="https://blog.angular.io/version-6-0-0-of-angular-now-available-cc56b0efa7a4">
|
||||
<mat-icon class="icon" svgIcon="insert_comment" aria-label="Announcement"></mat-icon>
|
||||
<span class="message">Version 6 of Angular Now Available!</span>
|
||||
<span class="action-button">Learn More</span>
|
||||
</a>
|
||||
</aio-notification>
|
||||
</mat-toolbar-row>
|
||||
<mat-toolbar-row>
|
||||
|
@ -115,7 +115,6 @@ describe('ApiListComponent', () => {
|
||||
|
||||
component.filteredSections.subscribe(filtered => {
|
||||
filtered = filtered.filter(s => s.items);
|
||||
console.log(filtered);
|
||||
expect(filtered.length).toBe(1, 'sections');
|
||||
expect(filtered[0].name).toBe(section, 'section name');
|
||||
const items = filtered[0].items!;
|
||||
|
@ -1,8 +1,6 @@
|
||||
<a href="{{actionUrl}}" class="content" (click)="dismiss()">
|
||||
<mat-icon class="icon" [svgIcon]="icon" [attr.aria-label]="iconLabel"></mat-icon>
|
||||
<span class="message"><ng-content></ng-content></span>
|
||||
<span class="action-button">{{buttonText}}</span>
|
||||
</a>
|
||||
<span class="content" (click)="contentClick()">
|
||||
<ng-content></ng-content>
|
||||
</span>
|
||||
|
||||
<button mat-icon-button class="close-button" aria-label="Close" (click)="dismiss()">
|
||||
<mat-icon svgIcon="close" aria-label="Dismiss notification"></mat-icon>
|
||||
|
@ -30,37 +30,49 @@ describe('NotificationComponent', () => {
|
||||
fixture.detectChanges();
|
||||
}
|
||||
|
||||
it('should display the message', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
expect(fixture.nativeElement.innerHTML).toContain('Help Angular by taking a <strong>1 minute survey</strong>!');
|
||||
describe('content projection', () => {
|
||||
it('should display the message text', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
expect(fixture.nativeElement.innerHTML).toContain('Version 6 of Angular Now Available!');
|
||||
});
|
||||
|
||||
it('should render HTML elements', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
const button = fixture.debugElement.query(By.css('.action-button'));
|
||||
expect(button.nativeElement.textContent).toEqual('Learn More');
|
||||
});
|
||||
|
||||
it('should process Angular directives', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
const badSpans = fixture.debugElement.queryAll(By.css('.bad'));
|
||||
expect(badSpans.length).toEqual(0);
|
||||
});
|
||||
});
|
||||
|
||||
it('should display an icon', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
const iconElement = fixture.debugElement.query(By.css('.icon'));
|
||||
expect(iconElement.properties['svgIcon']).toEqual('insert_comment');
|
||||
expect(iconElement.attributes['aria-label']).toEqual('Survey');
|
||||
});
|
||||
|
||||
it('should display a button', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
const button = fixture.debugElement.query(By.css('.action-button'));
|
||||
expect(button.nativeElement.textContent).toEqual('Go to survey');
|
||||
});
|
||||
|
||||
it('should call dismiss when the message link is clicked', () => {
|
||||
it('should call dismiss() when the message link is clicked, if dismissOnContentClick is true', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
spyOn(component, 'dismiss');
|
||||
fixture.debugElement.query(By.css('a')).triggerEventHandler('click', null);
|
||||
fixture.detectChanges();
|
||||
component.dismissOnContentClick = true;
|
||||
const message: HTMLSpanElement = fixture.debugElement.query(By.css('.messageholder')).nativeElement;
|
||||
message.click();
|
||||
expect(component.dismiss).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should call dismiss when the close button is clicked', () => {
|
||||
it('should not call dismiss() when the message link is clicked, if dismissOnContentClick is false', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
spyOn(component, 'dismiss');
|
||||
component.dismissOnContentClick = false;
|
||||
const message: HTMLSpanElement = fixture.debugElement.query(By.css('.messageholder')).nativeElement;
|
||||
message.click();
|
||||
expect(component.dismiss).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should call dismiss() when the close button is clicked', () => {
|
||||
configTestingModule();
|
||||
createComponent();
|
||||
spyOn(component, 'dismiss');
|
||||
@ -104,13 +116,15 @@ describe('NotificationComponent', () => {
|
||||
@Component({
|
||||
template: `
|
||||
<aio-notification
|
||||
icon="insert_comment"
|
||||
iconLabel="Survey"
|
||||
buttonText="Go to survey"
|
||||
actionUrl="https://bit.ly/angular-survey-2018"
|
||||
notificationId="survey-january-2018"
|
||||
expirationDate="2018-01-22">
|
||||
Help Angular by taking a <strong>1 minute survey</strong>!
|
||||
<span class="messageholder">
|
||||
<a href="https://blog.angular.io/version-6-0-0-of-angular-now-available-cc56b0efa7a4">
|
||||
<span *ngIf="false" class="bad">This should not appear</span>
|
||||
<span class="message">Version 6 of Angular Now Available!</span>
|
||||
<span class="action-button">Learn More</span>
|
||||
</a>
|
||||
</span>
|
||||
</aio-notification>`
|
||||
})
|
||||
class TestComponent {
|
||||
|
@ -22,10 +22,7 @@ const LOCAL_STORAGE_NAMESPACE = 'aio-notification/';
|
||||
export class NotificationComponent implements OnInit {
|
||||
private get localStorage() { return this.window.localStorage; }
|
||||
|
||||
@Input() icon: string;
|
||||
@Input() iconLabel: string;
|
||||
@Input() buttonText: string;
|
||||
@Input() actionUrl: string;
|
||||
@Input() dismissOnContentClick: boolean;
|
||||
@Input() notificationId: string;
|
||||
@Input() expirationDate: string;
|
||||
@Output() dismissed = new EventEmitter();
|
||||
@ -44,6 +41,12 @@ export class NotificationComponent implements OnInit {
|
||||
this.showNotification = previouslyHidden || expired ? 'hide' : 'show';
|
||||
}
|
||||
|
||||
contentClick() {
|
||||
if (this.dismissOnContentClick) {
|
||||
this.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
dismiss() {
|
||||
this.localStorage.setItem(LOCAL_STORAGE_NAMESPACE + this.notificationId, 'hide');
|
||||
this.showNotification = 'hide';
|
||||
|
@ -74,6 +74,13 @@ describe('GaService', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('sendEvent', () => {
|
||||
it('should send "event" with associated data', () => {
|
||||
gaService.sendEvent('some source', 'some campaign', 'a label', 45);
|
||||
expect(gaSpy).toHaveBeenCalledWith('send', 'event', 'some source', 'some campaign', 'a label', 45);
|
||||
});
|
||||
});
|
||||
|
||||
it('should support replacing the `window.ga` function', () => {
|
||||
const gaSpy2 = jasmine.createSpy('new ga');
|
||||
mockWindow.ga = gaSpy2;
|
||||
|
@ -29,6 +29,10 @@ export class GaService {
|
||||
this.ga('send', 'pageview');
|
||||
}
|
||||
|
||||
sendEvent(source: string, action: string, label?: string, value?: number) {
|
||||
this.ga('send', 'event', source, action, label, value);
|
||||
}
|
||||
|
||||
ga(...args: any[]) {
|
||||
const gaFn = (this.window as any)['ga'];
|
||||
if (gaFn) {
|
||||
|
@ -64,18 +64,22 @@ aio-shell.folder-tutorial mat-toolbar.mat-toolbar {
|
||||
margin: $hamburgerShownMargin;
|
||||
padding: 0;
|
||||
|
||||
&:not(.starting) {
|
||||
transition-duration: 0.4s;
|
||||
transition-property: color, margin;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
// Hamburger hidden by default on large screens.
|
||||
// (Will be shown per doc.)
|
||||
margin: $hamburgerHiddenMargin;
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
min-width: 15%;
|
||||
}
|
||||
|
||||
&:not(.starting) {
|
||||
transition-duration: 0.4s;
|
||||
transition-property: color, margin;
|
||||
transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: $offwhite;
|
||||
}
|
||||
@ -92,6 +96,10 @@ aio-shell.folder-tutorial mat-toolbar.mat-toolbar {
|
||||
margin: 0 16px 0 0;
|
||||
padding: 21px 0;
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
img {
|
||||
position: relative;
|
||||
margin-top: -21px;
|
||||
@ -194,12 +202,17 @@ aio-search-box.search-container {
|
||||
.toolbar-external-icons-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 100%;
|
||||
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 16px;
|
||||
|
||||
@media screen and (max-width: 480px) {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
@ -31,11 +31,14 @@ aio-notification {
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
max-width: calc(100% - #{$notificationHeight});
|
||||
text-transform: none;
|
||||
padding: 0;
|
||||
|
||||
> * {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.icon {
|
||||
margin-right: 10px;
|
||||
@media (max-width: 464px) {
|
||||
@ -46,10 +49,10 @@ aio-notification {
|
||||
.message {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.action-button {
|
||||
margin-left: 10px;
|
||||
background: $brightred;
|
||||
border-radius: 15px;
|
||||
text-transform: uppercase;
|
||||
|
@ -0,0 +1,21 @@
|
||||
{
|
||||
"scripts": [
|
||||
{ "name": "ng", "command": "ng" },
|
||||
{ "name": "build", "command": "ng build" },
|
||||
{ "name": "start", "command": "ng serve" },
|
||||
{ "name": "test", "command": "ng test" },
|
||||
{ "name": "lint", "command": "ng lint" },
|
||||
{ "name": "e2e", "command": "ng e2e" }
|
||||
],
|
||||
"dependencies": [
|
||||
"@angular/elements"
|
||||
],
|
||||
"devDependencies": [
|
||||
"@angular-devkit/build-angular",
|
||||
"@angular/cli",
|
||||
"@types/jasminewd2",
|
||||
"jasmine-spec-reporter",
|
||||
"karma-coverage-istanbul-reporter",
|
||||
"ts-node"
|
||||
]
|
||||
}
|
26
index.bzl
Normal file
26
index.bzl
Normal file
@ -0,0 +1,26 @@
|
||||
# Copyright Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by an MIT-style license that can be
|
||||
# found in the LICENSE file at https://angular.io/license
|
||||
""" Public API surface is re-exported here.
|
||||
|
||||
This API is exported for user's building angular from source in downstream
|
||||
projects. The rules from packages/bazel are re-exported here as well
|
||||
as the ng_setup_workspace repository rule needed when building angular
|
||||
from source downstream. Alternately, this API is available from the
|
||||
@angular/bazel npm package if the npm distribution of angular is
|
||||
used in a downstream project.
|
||||
"""
|
||||
|
||||
load("//packages/bazel:index.bzl",
|
||||
_ng_module = "ng_module",
|
||||
_ng_package = "ng_package",
|
||||
_protractor_web_test = "protractor_web_test",
|
||||
_protractor_web_test_suite = "protractor_web_test_suite")
|
||||
load("//tools:ng_setup_workspace.bzl", _ng_setup_workspace = "ng_setup_workspace")
|
||||
|
||||
ng_module = _ng_module
|
||||
ng_package = _ng_package
|
||||
protractor_web_test = _protractor_web_test
|
||||
protractor_web_test_suite = _protractor_web_test_suite
|
||||
ng_setup_workspace = _ng_setup_workspace
|
@ -38,6 +38,20 @@ http_archive(
|
||||
sha256 = "b243c4d64f054c174051785862ab079050d90b37a1cef7da93821c6981cb9ad4",
|
||||
)
|
||||
|
||||
#
|
||||
# Point Bazel to WORKSPACEs that live in subdirectories
|
||||
#
|
||||
|
||||
local_repository(
|
||||
name = "angular",
|
||||
path = "node_modules/@angular/bazel",
|
||||
)
|
||||
|
||||
local_repository(
|
||||
name = "rxjs",
|
||||
path = "node_modules/rxjs/src",
|
||||
)
|
||||
|
||||
#
|
||||
# Load and install our dependencies downloaded above.
|
||||
#
|
||||
@ -68,24 +82,6 @@ load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")
|
||||
|
||||
sass_repositories()
|
||||
|
||||
#
|
||||
# Point Bazel to WORKSPACEs that live in subdirectories
|
||||
#
|
||||
|
||||
local_repository(
|
||||
name = "angular",
|
||||
path = "node_modules/@angular/bazel",
|
||||
)
|
||||
|
||||
local_repository(
|
||||
name = "rxjs",
|
||||
path = "node_modules/rxjs/src",
|
||||
)
|
||||
|
||||
#
|
||||
# Load and install our dependencies from local repositories
|
||||
#
|
||||
|
||||
load("@angular//:index.bzl", "ng_setup_workspace")
|
||||
|
||||
ng_setup_workspace()
|
||||
|
@ -23,9 +23,12 @@
|
||||
version "6.1.0-beta.3"
|
||||
dependencies:
|
||||
chokidar "^1.4.2"
|
||||
convert-source-map "^1.5.1"
|
||||
magic-string "^0.25.0"
|
||||
minimist "^1.2.0"
|
||||
reflect-metadata "^0.1.2"
|
||||
tsickle "^0.30.0"
|
||||
source-map "^0.6.1"
|
||||
tsickle "^0.32.1"
|
||||
|
||||
"@angular/compiler@file:../../dist/packages-dist/compiler":
|
||||
version "6.1.0-beta.3"
|
||||
@ -316,6 +319,10 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
|
||||
|
||||
convert-source-map@^1.5.1:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
|
||||
|
||||
core-util-is@1.0.2, core-util-is@~1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||
@ -826,6 +833,12 @@ long@~3:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b"
|
||||
|
||||
magic-string@^0.25.0:
|
||||
version "0.25.0"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.0.tgz#1f3696f9931ff0a1ed4c132250529e19cad6759b"
|
||||
dependencies:
|
||||
sourcemap-codec "^1.4.1"
|
||||
|
||||
math-random@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/math-random/-/math-random-1.0.1.tgz#8b3aac588b8a66e4975e3cdea67f7bb329601fac"
|
||||
@ -1305,10 +1318,14 @@ source-map@^0.5.6:
|
||||
version "0.5.7"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||
|
||||
source-map@^0.6.0:
|
||||
source-map@^0.6.0, source-map@^0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
|
||||
|
||||
sourcemap-codec@^1.4.1:
|
||||
version "1.4.1"
|
||||
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.1.tgz#c8fd92d91889e902a07aee392bdd2c5863958ba2"
|
||||
|
||||
sshpk@^1.7.0:
|
||||
version "1.14.2"
|
||||
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98"
|
||||
|
@ -10,7 +10,7 @@
|
||||
"@angular/core": "file:../../dist/packages-dist/core",
|
||||
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
|
||||
"@angular/platform-server": "file:../../dist/packages-dist/platform-server",
|
||||
"google-closure-compiler": "20180319.0.0",
|
||||
"google-closure-compiler": "20180716.0.0",
|
||||
"rxjs": "file:../../node_modules/rxjs",
|
||||
"typescript": "file:../../node_modules/typescript",
|
||||
"zone.js": "file:../../node_modules/zone.js"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,6 +31,8 @@ module.exports = function(config) {
|
||||
// Serve AngularJS for `ngUpgrade` testing.
|
||||
{pattern: 'node_modules/angular-1.5/angular.js', included: false, watched: false},
|
||||
{pattern: 'node_modules/angular-mocks-1.5/angular-mocks.js', included: false, watched: false},
|
||||
{pattern: 'node_modules/angular-1.6/angular.js', included: false, watched: false},
|
||||
{pattern: 'node_modules/angular-mocks-1.6/angular-mocks.js', included: false, watched: false},
|
||||
{pattern: 'node_modules/angular/angular.js', included: false, watched: false},
|
||||
{pattern: 'node_modules/angular-mocks/angular-mocks.js', included: false, watched: false},
|
||||
|
||||
@ -110,6 +112,7 @@ module.exports = function(config) {
|
||||
// don't need this entire config file.
|
||||
proxies: {
|
||||
'/base/angular/': '/base/',
|
||||
'/base/angular_deps/': '/base/',
|
||||
},
|
||||
|
||||
reporters: ['dots'],
|
||||
|
@ -29,7 +29,7 @@ describe('largeform benchmark perf', () => {
|
||||
|
||||
[CreateAndDestroyWorker].forEach((worker) => {
|
||||
describe(worker.id, () => {
|
||||
it('should run for ng2', (done) => {
|
||||
it('should run for ng2', done => {
|
||||
runLargeFormBenchmark({
|
||||
id: `largeform.ng2.${worker.id}`,
|
||||
url: 'all/benchmarks/src/largeform/ng2/index.html',
|
||||
|
@ -40,7 +40,7 @@ describe('largetable benchmark perf', () => {
|
||||
|
||||
[CreateOnlyWorker, CreateAndDestroyWorker, UpdateWorker].forEach((worker) => {
|
||||
describe(worker.id, () => {
|
||||
it('should run for ng2', (done) => {
|
||||
it('should run for ng2', done => {
|
||||
runTableBenchmark({
|
||||
id: `largeTable.ng2.${worker.id}`,
|
||||
url: 'all/benchmarks/src/largetable/ng2/index.html',
|
||||
@ -48,7 +48,7 @@ describe('largetable benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should run for ng2 with ngSwitch', (done) => {
|
||||
it('should run for ng2 with ngSwitch', done => {
|
||||
runTableBenchmark({
|
||||
id: `largeTable.ng2_switch.${worker.id}`,
|
||||
url: 'all/benchmarks/src/largetable/ng2_switch/index.html',
|
||||
@ -56,7 +56,7 @@ describe('largetable benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should run for render3', (done) => {
|
||||
it('should run for render3', done => {
|
||||
runTableBenchmark({
|
||||
id: `largeTable.render3.${worker.id}`,
|
||||
url: 'all/benchmarks/src/largetable/render3/index.html',
|
||||
@ -65,7 +65,7 @@ describe('largetable benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should run for iv', (done) => {
|
||||
it('should run for iv', done => {
|
||||
runTableBenchmark({
|
||||
id: `largeTable.iv.${worker.id}`,
|
||||
url: 'all/benchmarks/src/largetable/iv/index.html',
|
||||
@ -74,7 +74,7 @@ describe('largetable benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should run for the baseline', (done) => {
|
||||
it('should run for the baseline', done => {
|
||||
runTableBenchmark({
|
||||
id: `largeTable.baseline.${worker.id}`,
|
||||
url: 'all/benchmarks/src/largetable/baseline/index.html',
|
||||
@ -83,7 +83,7 @@ describe('largetable benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should run for incremental-dom', (done) => {
|
||||
it('should run for incremental-dom', done => {
|
||||
runTableBenchmark({
|
||||
id: `largeTable.incremental_dom.${worker.id}`,
|
||||
url: 'all/benchmarks/src/largetable/incremental_dom/index.html',
|
||||
|
@ -24,7 +24,7 @@ describe('tree benchmark perf', () => {
|
||||
Benchmarks.forEach(benchmark => {
|
||||
describe(benchmark.id, () => {
|
||||
// This is actually a destroyOnly benchmark
|
||||
it('should work for createOnly', (done) => {
|
||||
it('should work for createOnly', done => {
|
||||
runTreeBenchmark({
|
||||
id: 'createOnly',
|
||||
benchmark,
|
||||
@ -33,7 +33,7 @@ describe('tree benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should work for createOnlyForReal', (done) => {
|
||||
it('should work for createOnlyForReal', done => {
|
||||
runTreeBenchmark({
|
||||
id: 'createOnlyForReal',
|
||||
benchmark,
|
||||
@ -42,7 +42,7 @@ describe('tree benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should work for createDestroy', (done) => {
|
||||
it('should work for createDestroy', done => {
|
||||
runTreeBenchmark({
|
||||
id: 'createDestroy',
|
||||
benchmark,
|
||||
@ -53,13 +53,13 @@ describe('tree benchmark perf', () => {
|
||||
}).then(done, done.fail);
|
||||
});
|
||||
|
||||
it('should work for update', (done) => {
|
||||
it('should work for update', done => {
|
||||
runTreeBenchmark({id: 'update', benchmark, work: () => $(CreateBtn).click()})
|
||||
.then(done, done.fail);
|
||||
});
|
||||
|
||||
if (benchmark.buttons.indexOf(DetectChangesBtn) !== -1) {
|
||||
it('should work for detectChanges', (done) => {
|
||||
it('should work for detectChanges', done => {
|
||||
runTreeBenchmark({
|
||||
id: 'detectChanges',
|
||||
benchmark,
|
||||
|
@ -41,7 +41,7 @@ describe('largetable benchmark perf', () => {
|
||||
|
||||
[CreateOnlyWorker, CreateAndDestroyWorker, UpdateWorker].forEach((worker) => {
|
||||
describe(worker.id, () => {
|
||||
it('should run for render3', (done) => {
|
||||
it('should run for render3', done => {
|
||||
runTableBenchmark({
|
||||
id: `largeTable.render3.${worker.id}`,
|
||||
url: 'index.html',
|
||||
|
10
modules/types.d.ts
vendored
10
modules/types.d.ts
vendored
@ -8,11 +8,11 @@
|
||||
|
||||
// This file contains all ambient imports needed to compile the modules/ source code
|
||||
|
||||
/// <reference path="../node_modules/@types/hammerjs/index.d.ts" />
|
||||
/// <reference path="../node_modules/@types/jasmine/index.d.ts" />
|
||||
/// <reference path="../node_modules/@types/jasminewd2/index.d.ts" />
|
||||
/// <reference path="../node_modules/@types/node/index.d.ts" />
|
||||
/// <reference path="../node_modules/zone.js/dist/zone.js.d.ts" />
|
||||
/// <reference types="hammerjs" />
|
||||
/// <reference types="jasmine" />
|
||||
/// <reference types="jasminewd2" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="zone.js" />
|
||||
/// <reference path="../tools/types-ext/jasminewd2.d.ts" />
|
||||
/// <reference path="./es6-subset.d.ts" />
|
||||
/// <reference path="./system.d.ts" />
|
||||
|
12
package.json
12
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "angular-srcs",
|
||||
"version": "6.1.0",
|
||||
"version": "6.1.1",
|
||||
"private": true,
|
||||
"branchPattern": "2.0.*",
|
||||
"description": "Angular - a web framework for modern web apps",
|
||||
@ -21,7 +21,9 @@
|
||||
"prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier",
|
||||
"buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/*/buildifier",
|
||||
"preinstall": "node tools/yarn/check-yarn.js",
|
||||
"postinstall": "yarn update-webdriver && node ./tools/postinstall-patches.js",
|
||||
"postinstall": "yarn update-webdriver && node ./tools/postinstall-patches.js && yarn patch-types",
|
||||
"//patch-types": "work-around for issue https://github.com/angular/angular/issues/25051",
|
||||
"patch-types": "node -e \"var sh = require('shelljs'); sh.set('-e'); sh.mkdir('-p', 'node_modules/@types/zone.js'); sh.cp('-f', 'node_modules/zone.js/dist/zone.js.d.ts', 'node_modules/@types/zone.js/index.d.ts')\"",
|
||||
"update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG",
|
||||
"check-env": "gulp check-env",
|
||||
"commitmsg": "node ./scripts/git/commit-msg.js"
|
||||
@ -56,10 +58,12 @@
|
||||
"@types/source-map": "^0.5.1",
|
||||
"@types/systemjs": "0.19.32",
|
||||
"@webcomponents/custom-elements": "^1.0.4",
|
||||
"angular": "npm:angular@1.6",
|
||||
"angular": "npm:angular@1.7",
|
||||
"angular-1.5": "npm:angular@1.5",
|
||||
"angular-mocks": "npm:angular-mocks@1.6",
|
||||
"angular-1.6": "npm:angular@1.6",
|
||||
"angular-mocks": "npm:angular-mocks@1.7",
|
||||
"angular-mocks-1.5": "npm:angular-mocks@1.5",
|
||||
"angular-mocks-1.6": "npm:angular-mocks@1.6",
|
||||
"base64-js": "1.2.1",
|
||||
"bower": "1.8.2",
|
||||
"browserstacktunnel-wrapper": "2.0.1",
|
||||
|
@ -26,7 +26,7 @@ export interface AnimationPlayer {
|
||||
finish(): void;
|
||||
destroy(): void;
|
||||
reset(): void;
|
||||
setPosition(p: any /** TODO #9100 */): void;
|
||||
setPosition(position: any /** TODO #9100 */): void;
|
||||
getPosition(): number;
|
||||
parentPlayer: AnimationPlayer|null;
|
||||
readonly totalTime: number;
|
||||
@ -93,7 +93,7 @@ export class NoopAnimationPlayer implements AnimationPlayer {
|
||||
}
|
||||
}
|
||||
reset(): void {}
|
||||
setPosition(p: number): void {}
|
||||
setPosition(position: number): void {}
|
||||
getPosition(): number { return 0; }
|
||||
|
||||
/** @internal */
|
||||
|
@ -207,6 +207,12 @@ export function compile({allowNonHermeticReads, allDepsCompiledWithBazel = true,
|
||||
if (fileName ===
|
||||
path.join(compilerOpts.baseUrl, bazelOpts.package, compilerOpts.flatModuleOutFile + '.ts'))
|
||||
return true;
|
||||
// Also handle the case when angular is build from source as an external repository
|
||||
if (fileName ===
|
||||
path.join(
|
||||
compilerOpts.baseUrl, 'external/angular', bazelOpts.package,
|
||||
compilerOpts.flatModuleOutFile + '.ts'))
|
||||
return true;
|
||||
return origBazelHostShouldNameModule(fileName) || NGC_GEN_FILES.test(fileName);
|
||||
};
|
||||
|
||||
|
@ -70,7 +70,7 @@ export function createTsConfig(options: TsConfigOptions) {
|
||||
'tsickleExternsPath': '',
|
||||
// we don't copy the node_modules into our tmp dir, so we should look in
|
||||
// the original workspace directory for it
|
||||
'nodeModulesPrefix': '../angular/node_modules',
|
||||
'nodeModulesPrefix': '../angular/external/angular_deps/node_modules',
|
||||
},
|
||||
'files': options.files,
|
||||
'angularCompilerOptions': {
|
||||
|
@ -49,6 +49,6 @@ protractor_web_test_suite(
|
||||
configuration = ":conf.js",
|
||||
data = ["//packages/bazel/src/protractor/utils"],
|
||||
on_prepare = ":on-prepare.js",
|
||||
server = ":prodserver",
|
||||
server = ":devserver",
|
||||
deps = [":ts_spec"],
|
||||
)
|
||||
|
@ -6,15 +6,14 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {HttpHandler} from '../src/backend';
|
||||
import {HttpHeaders} from '../src/headers';
|
||||
import {HttpRequest} from '../src/request';
|
||||
import {HttpXsrfCookieExtractor, HttpXsrfInterceptor} from '../src/xsrf';
|
||||
import {HttpXsrfCookieExtractor, HttpXsrfInterceptor, HttpXsrfTokenExtractor} from '../src/xsrf';
|
||||
|
||||
import {HttpClientTestingBackend} from '../testing/src/backend';
|
||||
|
||||
class SampleTokenExtractor {
|
||||
constructor(private token: string|null) {}
|
||||
class SampleTokenExtractor extends HttpXsrfTokenExtractor {
|
||||
constructor(private token: string|null) { super(); }
|
||||
|
||||
getToken(): string|null { return this.token; }
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ ts_library(
|
||||
],
|
||||
),
|
||||
module_name = "@angular/compiler-cli",
|
||||
node_modules = "@//:node_modules",
|
||||
node_modules = "@angular_deps//:node_modules",
|
||||
tsconfig = ":tsconfig",
|
||||
deps = [
|
||||
"//packages/compiler",
|
||||
|
@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"reflect-metadata": "^0.1.2",
|
||||
"minimist": "^1.2.0",
|
||||
"tsickle": "^0.30.0",
|
||||
"tsickle": "^0.32.1",
|
||||
"chokidar": "^1.4.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -124,7 +124,8 @@ export function setupBazelTo(basePath: string) {
|
||||
}
|
||||
|
||||
// Link typescript
|
||||
const typescriptSource = path.join(sources, 'angular/node_modules/typescript');
|
||||
const typescriptSource =
|
||||
path.join(sources, 'angular/external/angular_deps/node_modules/typescript');
|
||||
const typescriptDest = path.join(nodeModulesPath, 'typescript');
|
||||
if (fs.existsSync(typescriptSource)) {
|
||||
fs.symlinkSync(typescriptSource, typescriptDest);
|
||||
|
@ -8,12 +8,13 @@
|
||||
|
||||
import {ParseLocation, ParseSourceFile, ParseSourceSpan} from '@angular/compiler';
|
||||
import * as o from '@angular/compiler/src/output/output_ast';
|
||||
import {MappingItem, RawSourceMap, SourceMapConsumer} from 'source-map';
|
||||
import * as ts from 'typescript';
|
||||
|
||||
import {TypeScriptNodeEmitter} from '../../src/transformers/node_emitter';
|
||||
import {Directory, MockAotContext, MockCompilerHost} from '../mocks';
|
||||
|
||||
const sourceMap = require('source-map');
|
||||
|
||||
const someGenFilePath = '/somePackage/someGenFile';
|
||||
const someGenFileName = someGenFilePath + '.ts';
|
||||
const someSourceFilePath = '/somePackage/someSourceFile';
|
||||
@ -469,16 +470,16 @@ describe('TypeScriptNodeEmitter', () => {
|
||||
return result;
|
||||
}
|
||||
|
||||
function mappingItemsOf(text: string): MappingItem[] {
|
||||
function mappingItemsOf(text: string) {
|
||||
// find the source map:
|
||||
const sourceMapMatch = /sourceMappingURL\=data\:application\/json;base64,(.*)$/.exec(text);
|
||||
const sourceMapBase64 = sourceMapMatch ![1];
|
||||
const sourceMapBuffer = Buffer.from(sourceMapBase64, 'base64');
|
||||
const sourceMapText = sourceMapBuffer.toString('utf8');
|
||||
const sourceMap: RawSourceMap = JSON.parse(sourceMapText);
|
||||
const consumer = new SourceMapConsumer(sourceMap);
|
||||
const mappings: MappingItem[] = [];
|
||||
consumer.eachMapping(mapping => { mappings.push(mapping); });
|
||||
const sourceMapParsed = JSON.parse(sourceMapText);
|
||||
const consumer = new sourceMap.SourceMapConsumer(sourceMapParsed);
|
||||
const mappings: any[] = [];
|
||||
consumer.eachMapping((mapping: any) => { mappings.push(mapping); });
|
||||
return mappings;
|
||||
}
|
||||
|
||||
|
@ -13,14 +13,11 @@ import {Inject, Injectable, InjectionToken, Optional} from './di';
|
||||
|
||||
/**
|
||||
* A function that will be executed when an application is initialized.
|
||||
* @experimental
|
||||
*/
|
||||
export const APP_INITIALIZER = new InjectionToken<Array<() => void>>('Application Initializer');
|
||||
|
||||
/**
|
||||
* A class that reflects the state of running {@link APP_INITIALIZER}s.
|
||||
*
|
||||
* @experimental
|
||||
*/
|
||||
@Injectable()
|
||||
export class ApplicationInitStatus {
|
||||
|
@ -27,6 +27,7 @@ ts_library(
|
||||
"//packages/platform-browser-dynamic",
|
||||
"//packages/platform-browser/animations",
|
||||
"//packages/platform-browser/testing",
|
||||
"//packages/private/testing",
|
||||
"//packages/router",
|
||||
"//packages/router/testing",
|
||||
"@rxjs",
|
||||
|
@ -7,8 +7,9 @@
|
||||
*/
|
||||
|
||||
import {ApplicationModule, ApplicationRef, DoCheck, InjectFlags, InjectorType, Input, OnInit, PlatformRef, TestabilityRegistry, Type, defineInjector, inject, ɵE as elementStart, ɵNgModuleDef as NgModuleDef, ɵRenderFlags as RenderFlags, ɵT as text, ɵdefineComponent as defineComponent, ɵe as elementEnd, ɵi1 as interpolation1, ɵt as textBinding} from '@angular/core';
|
||||
import {getTestBed, withBody} from '@angular/core/testing';
|
||||
import {getTestBed} from '@angular/core/testing';
|
||||
import {BrowserModule, EVENT_MANAGER_PLUGINS, platformBrowser} from '@angular/platform-browser';
|
||||
import {withBody} from '@angular/private/testing';
|
||||
|
||||
import {BROWSER_MODULE_PROVIDERS} from '../../platform-browser/src/browser';
|
||||
import {APPLICATION_MODULE_PROVIDERS} from '../src/application_module';
|
||||
|
@ -38,6 +38,7 @@ ts_library(
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/core/testing",
|
||||
"//packages/private/testing",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {withBody} from '@angular/core/testing';
|
||||
import {withBody} from '@angular/private/testing';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
|
@ -38,6 +38,7 @@ ts_library(
|
||||
deps = [
|
||||
"//packages:types",
|
||||
"//packages/core/testing",
|
||||
"//packages/private/testing",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {withBody} from '@angular/core/testing';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
|
@ -39,6 +39,7 @@ ts_library(
|
||||
":injection",
|
||||
"//packages:types",
|
||||
"//packages/core/testing",
|
||||
"//packages/private/testing",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -44,6 +44,7 @@ ts_library(
|
||||
"//packages:types",
|
||||
"//packages/core",
|
||||
"//packages/core/testing",
|
||||
"//packages/private/testing",
|
||||
],
|
||||
)
|
||||
|
||||
@ -76,7 +77,7 @@ js_expected_symbol_test(
|
||||
genrule(
|
||||
name = "tslib",
|
||||
srcs = [
|
||||
"//:node_modules/tslib/tslib.js",
|
||||
"@angular_deps//:node_modules/tslib/tslib.js",
|
||||
],
|
||||
outs = [
|
||||
"tslib.js",
|
||||
|
@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {ɵwhenRendered as whenRendered} from '@angular/core';
|
||||
import {withBody} from '@angular/core/testing';
|
||||
import {withBody} from '@angular/private/testing';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
|
@ -27,6 +27,7 @@ ts_library(
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
"//packages/platform-browser/testing",
|
||||
"//packages/private/testing",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {withBody} from '@angular/core/testing';
|
||||
import {withBody} from '@angular/private/testing';
|
||||
|
||||
import {ChangeDetectionStrategy, ChangeDetectorRef, DoCheck} from '../../src/core';
|
||||
import {getRenderedText, whenRendered} from '../../src/render3/component';
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import {NgForOf, NgForOfContext} from '@angular/common';
|
||||
import {Component, ContentChild, Directive, EventEmitter, Injectable, Input, NgModule, OnDestroy, Optional, Output, Pipe, PipeTransform, QueryList, SimpleChanges, TemplateRef, Type, ViewChild, ViewContainerRef, defineInjectable, defineInjector} from '@angular/core';
|
||||
import {withBody} from '@angular/core/testing';
|
||||
import {withBody} from '@angular/private/testing';
|
||||
|
||||
import * as r3 from '../../../src/render3/index';
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {withBody} from '@angular/core/testing';
|
||||
import {withBody} from '@angular/private/testing';
|
||||
|
||||
describe('testing', () => {
|
||||
describe('withBody', () => {
|
||||
|
@ -19,4 +19,3 @@ export * from './test_bed';
|
||||
export * from './before_each';
|
||||
export * from './metadata_override';
|
||||
export * from './private_export_testing';
|
||||
export * from './render3';
|
||||
|
@ -24,10 +24,10 @@ filegroup(
|
||||
name = "elements_test_bootstrap_scripts",
|
||||
# do not sort
|
||||
srcs = [
|
||||
"//:node_modules/@webcomponents/custom-elements/src/native-shim.js",
|
||||
"//:node_modules/reflect-metadata/Reflect.js",
|
||||
"//:node_modules/zone.js/dist/zone.js",
|
||||
"//:node_modules/zone.js/dist/zone-testing.js",
|
||||
"@angular_deps//:node_modules/@webcomponents/custom-elements/src/native-shim.js",
|
||||
"@angular_deps//:node_modules/reflect-metadata/Reflect.js",
|
||||
"@angular_deps//:node_modules/zone.js/dist/zone.js",
|
||||
"@angular_deps//:node_modules/zone.js/dist/zone-testing.js",
|
||||
],
|
||||
)
|
||||
|
||||
@ -38,7 +38,7 @@ ts_web_test_suite(
|
||||
],
|
||||
# do not sort
|
||||
deps = [
|
||||
"//:node_modules/tslib/tslib.js",
|
||||
"@angular_deps//:node_modules/tslib/tslib.js",
|
||||
"//tools/testing:browser",
|
||||
":test_lib",
|
||||
],
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {InjectFlags, InjectionToken, Injector, ReflectiveInjector, Type, inject, ɵsetCurrentInjector as setCurrentInjector} from '@angular/core';
|
||||
import {InjectFlags, InjectionToken, Injector, Type, inject, ɵsetCurrentInjector as setCurrentInjector} from '@angular/core';
|
||||
|
||||
class MockRootScopeInjector implements Injector {
|
||||
constructor(readonly parent: Injector) {}
|
||||
@ -31,7 +31,7 @@ class MockRootScopeInjector implements Injector {
|
||||
it('works', () => {
|
||||
// #docregion Injector
|
||||
const injector: Injector =
|
||||
ReflectiveInjector.resolveAndCreate([{provide: 'validToken', useValue: 'Value'}]);
|
||||
Injector.create({providers: [{provide: 'validToken', useValue: 'Value'}]});
|
||||
expect(injector.get('validToken')).toEqual('Value');
|
||||
expect(() => injector.get('invalidToken')).toThrowError();
|
||||
expect(injector.get('invalidToken', 'notFound')).toEqual('notFound');
|
||||
@ -40,7 +40,7 @@ class MockRootScopeInjector implements Injector {
|
||||
|
||||
it('injects injector', () => {
|
||||
// #docregion injectInjector
|
||||
const injector = ReflectiveInjector.resolveAndCreate([]);
|
||||
const injector = Injector.create({providers: []});
|
||||
expect(injector.get(Injector)).toBe(injector);
|
||||
// #enddocregion
|
||||
});
|
||||
@ -49,7 +49,7 @@ class MockRootScopeInjector implements Injector {
|
||||
// #docregion InjectionToken
|
||||
const BASE_URL = new InjectionToken<string>('BaseUrl');
|
||||
const injector =
|
||||
ReflectiveInjector.resolveAndCreate([{provide: BASE_URL, useValue: 'http://localhost'}]);
|
||||
Injector.create({providers: [{provide: BASE_URL, useValue: 'http://localhost'}]});
|
||||
const url = injector.get(BASE_URL);
|
||||
// here `url` is inferred to be `string` because `BASE_URL` is `InjectionToken<string>`.
|
||||
expect(url).toBe('http://localhost');
|
||||
@ -58,7 +58,8 @@ class MockRootScopeInjector implements Injector {
|
||||
|
||||
it('injects a tree-shakeable InjectionToken', () => {
|
||||
class MyDep {}
|
||||
const injector = new MockRootScopeInjector(ReflectiveInjector.resolveAndCreate([MyDep]));
|
||||
const injector =
|
||||
new MockRootScopeInjector(Injector.create({providers: [{provide: MyDep, deps: []}]}));
|
||||
|
||||
// #docregion ShakeableInjectionToken
|
||||
class MyService {
|
||||
|
@ -791,31 +791,31 @@ export abstract class AbstractControl {
|
||||
* Instantiate a `FormControl`, with an initial value.
|
||||
*
|
||||
* ```ts
|
||||
* const ctrl = new FormControl('some value');
|
||||
* console.log(ctrl.value); // 'some value'
|
||||
* const control = new FormControl('some value');
|
||||
* console.log(control.value); // 'some value'
|
||||
*```
|
||||
*
|
||||
* The following example initializes the control with a form state object. The `value`
|
||||
* and `disabled` keys are required in this case.
|
||||
*
|
||||
* ```ts
|
||||
* const ctrl = new FormControl({ value: 'n/a', disabled: true });
|
||||
* console.log(ctrl.value); // 'n/a'
|
||||
* console.log(ctrl.status); // 'DISABLED'
|
||||
* const control = new FormControl({ value: 'n/a', disabled: true });
|
||||
* console.log(control.value); // 'n/a'
|
||||
* console.log(control.status); // 'DISABLED'
|
||||
* ```
|
||||
*
|
||||
* The following example initializes the control with a sync validator.
|
||||
*
|
||||
* ```ts
|
||||
* const ctrl = new FormControl('', Validators.required);
|
||||
* console.log(ctrl.value); // ''
|
||||
* console.log(ctrl.status); // 'INVALID'
|
||||
* const control = new FormControl('', Validators.required);
|
||||
* console.log(control.value); // ''
|
||||
* console.log(control.status); // 'INVALID'
|
||||
* ```
|
||||
*
|
||||
* The following example initializes the control using an options object.
|
||||
*
|
||||
* ```ts
|
||||
* const ctrl = new FormControl('', {
|
||||
* const control = new FormControl('', {
|
||||
* validators: Validators.required,
|
||||
* asyncValidators: myAsyncValidator
|
||||
* });
|
||||
@ -826,7 +826,7 @@ export abstract class AbstractControl {
|
||||
* Set the `updateOn` option to `'blur'` to update on the blur `event`.
|
||||
*
|
||||
* ```ts
|
||||
* const ctrl = new FormControl('', { updateOn: 'blur' });
|
||||
* const control = new FormControl('', { updateOn: 'blur' });
|
||||
* ```
|
||||
*
|
||||
* ### Configure the control to update on a submit event
|
||||
@ -834,7 +834,7 @@ export abstract class AbstractControl {
|
||||
* Set the `updateOn` option to `'submit'` to update on a submit `event`.
|
||||
*
|
||||
* ```ts
|
||||
* const ctrl = new FormControl('', { updateOn: 'submit' });
|
||||
* const control = new FormControl('', { updateOn: 'submit' });
|
||||
* ```
|
||||
*
|
||||
* ### Reset the control back to an initial value
|
||||
@ -844,7 +844,7 @@ export abstract class AbstractControl {
|
||||
* (these are the only two properties that cannot be calculated).
|
||||
*
|
||||
* ```ts
|
||||
* const ctrl = new FormControl('Nancy');
|
||||
* const control = new FormControl('Nancy');
|
||||
*
|
||||
* console.log(control.value); // 'Nancy'
|
||||
*
|
||||
@ -856,15 +856,15 @@ export abstract class AbstractControl {
|
||||
* ### Reset the control back to an initial value and disabled
|
||||
*
|
||||
* ```
|
||||
* const ctrl = new FormControl('Nancy');
|
||||
* const control = new FormControl('Nancy');
|
||||
*
|
||||
* console.log(control.value); // 'Nancy'
|
||||
* console.log(this.control.status); // 'DISABLED'
|
||||
* console.log(control.status); // 'VALID'
|
||||
*
|
||||
* control.reset({ value: 'Drew', disabled: true });
|
||||
*
|
||||
* console.log(this.control.value); // 'Drew'
|
||||
* console.log(this.control.status); // 'DISABLED'
|
||||
* console.log(control.value); // 'Drew'
|
||||
* console.log(control.status); // 'DISABLED'
|
||||
*
|
||||
*/
|
||||
export class FormControl extends AbstractControl {
|
||||
|
@ -104,9 +104,9 @@ class BadTemplateUrl {
|
||||
reject = rej;
|
||||
});
|
||||
originalJasmineIt = jasmine.getEnv().it;
|
||||
jasmine.getEnv().it = (description: string, fn: any /** TODO #9100 */): any => {
|
||||
const done = () => { resolve(null); };
|
||||
(<any>done).fail = (err: any /** TODO #9100 */) => { reject(err); };
|
||||
jasmine.getEnv().it = (description: string, fn: (done: DoneFn) => void): any => {
|
||||
const done = (() => resolve(null)) as DoneFn;
|
||||
done.fail = reject;
|
||||
fn(done);
|
||||
return null;
|
||||
};
|
||||
@ -115,7 +115,7 @@ class BadTemplateUrl {
|
||||
|
||||
const restoreJasmineIt = () => { jasmine.getEnv().it = originalJasmineIt; };
|
||||
|
||||
it('should fail when an ResourceLoader fails', (done: any /** TODO #9100 */) => {
|
||||
it('should fail when an ResourceLoader fails', done => {
|
||||
const itPromise = patchJasmineIt();
|
||||
|
||||
it('should fail with an error from a promise', async(() => {
|
||||
|
16
packages/private/testing/BUILD.bazel
Normal file
16
packages/private/testing/BUILD.bazel
Normal file
@ -0,0 +1,16 @@
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
exports_files(["package.json"])
|
||||
|
||||
load("//tools:defaults.bzl", "ng_module")
|
||||
|
||||
ng_module(
|
||||
name = "testing",
|
||||
srcs = glob(
|
||||
["**/*.ts"],
|
||||
),
|
||||
module_name = "@angular/private/testing",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
],
|
||||
)
|
9
packages/private/testing/index.ts
Normal file
9
packages/private/testing/index.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
export * from './src/render3';
|
@ -35,18 +35,14 @@
|
||||
* @param blockFn function to wrap. The function can return promise or be `async`.
|
||||
* @experimental
|
||||
*/
|
||||
export function withBody<T>(html: string, blockFn: T): T {
|
||||
return function(done: {(): void, fail(): void}) {
|
||||
export function withBody<T extends Function>(html: string, blockFn: T): T {
|
||||
return function(done: DoneFn) {
|
||||
ensureDocument();
|
||||
let returnValue: any = undefined;
|
||||
if (typeof blockFn === 'function') {
|
||||
document.body.innerHTML = html;
|
||||
// TODO(i): I'm not sure why a cast is required here but otherwise I get
|
||||
// TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'never' has
|
||||
// no compatible call signatures.
|
||||
let blockReturn = (blockFn as any)();
|
||||
const blockReturn = blockFn();
|
||||
if (blockReturn instanceof Promise) {
|
||||
blockReturn = blockReturn.then(done, done.fail);
|
||||
blockReturn.then(done, done.fail);
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
@ -124,4 +120,4 @@ export function cleanupDocument(): void {
|
||||
}
|
||||
|
||||
if (typeof beforeEach == 'function') beforeEach(ensureDocument);
|
||||
if (typeof afterEach == 'function') beforeEach(cleanupDocument);
|
||||
if (typeof afterEach == 'function') beforeEach(cleanupDocument);
|
@ -252,7 +252,6 @@ import {UrlSegment, UrlSegmentGroup} from './url_tree';
|
||||
* Then it will extract the set of routes defined in that NgModule, and will transparently add
|
||||
* those routes to the main configuration.
|
||||
*
|
||||
* use Routes
|
||||
*/
|
||||
export type Routes = Route[];
|
||||
|
||||
|
@ -321,9 +321,9 @@ export interface ExtraOptions {
|
||||
* * 'enabled'--set the scroll position to the stored position. This option will be the default in
|
||||
* the future.
|
||||
*
|
||||
* When enabled, the router store store scroll positions when navigating forward, and will
|
||||
* restore the stored positions whe navigating back (popstate). When navigating forward,
|
||||
* the scroll position will be set to [0, 0], or to the anchor if one is provided.
|
||||
* When enabled, the router stores and restores scroll positions during navigation.
|
||||
* When navigating forward, the scroll position will be set to [0, 0], or to the anchor
|
||||
* if one is provided.
|
||||
*
|
||||
* You can implement custom scroll restoration behavior as follows.
|
||||
* ```typescript
|
||||
|
10
packages/types.d.ts
vendored
10
packages/types.d.ts
vendored
@ -6,12 +6,12 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// This file contains all ambient imports needed to compile the modules/ source code
|
||||
// This file contains all ambient imports needed to compile the packages/ source code
|
||||
|
||||
/// <reference path="../node_modules/@types/hammerjs/index.d.ts" />
|
||||
/// <reference path="../node_modules/@types/jasmine/index.d.ts" />
|
||||
/// <reference path="../node_modules/@types/node/index.d.ts" />
|
||||
/// <reference path="../node_modules/zone.js/dist/zone.js.d.ts" />
|
||||
/// <reference types="hammerjs" />
|
||||
/// <reference types="jasmine" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="zone.js" />
|
||||
/// <reference path="./es6-subset.d.ts" />
|
||||
/// <reference path="./goog.d.ts" />
|
||||
/// <reference path="./system.d.ts" />
|
||||
|
@ -15,6 +15,10 @@ const ng1Versions = [
|
||||
},
|
||||
{
|
||||
label: '1.6',
|
||||
files: ['angular-1.6/angular.js', 'angular-mocks-1.6/angular-mocks.js'],
|
||||
},
|
||||
{
|
||||
label: '1.7',
|
||||
files: ['angular/angular.js', 'angular-mocks/angular-mocks.js'],
|
||||
},
|
||||
];
|
||||
@ -55,7 +59,7 @@ export function createWithEachNg1VersionFn(setNg1: typeof setAngularJSGlobal) {
|
||||
(prev, file) => prev.then(() => new Promise<void>((resolve, reject) => {
|
||||
const restoreMethods = patchJasmineMethods();
|
||||
const script = document.createElement('script');
|
||||
script.src = `base/angular/node_modules/${file}`;
|
||||
script.src = `base/angular_deps/node_modules/${file}`;
|
||||
script.onerror = reject;
|
||||
script.onload = () => {
|
||||
document.body.removeChild(script);
|
||||
@ -73,7 +77,7 @@ export function createWithEachNg1VersionFn(setNg1: typeof setAngularJSGlobal) {
|
||||
// In these tests we are loading different versions of AngularJS on the same window.
|
||||
// AngularJS leaves an "expandoId" property on `document`, which can trick subsequent
|
||||
// `window.angular` instances into believing an app is already bootstrapped.
|
||||
win.angular.element(document).removeData();
|
||||
win.angular.element.cleanData([document]);
|
||||
|
||||
// Remove AngularJS to leave a clean state for subsequent tests.
|
||||
setNg1(undefined);
|
||||
|
@ -44,16 +44,16 @@ if [ -z ${TOKEN:-''} ]; then
|
||||
echo "WARNING: you should set the TOKEN variable to a github token"
|
||||
echo "############################################################"
|
||||
echo "############################################################"
|
||||
GHCURL="curl"
|
||||
GH_AUTH=""
|
||||
else
|
||||
GHCURL="curl -H \"Authorization: token $TOKEN\""
|
||||
GH_AUTH="Authorization: token $TOKEN"
|
||||
fi
|
||||
|
||||
PULL_JSON=`$GHCURL -s https://api.github.com/repos/angular/angular/pulls/$PR_NUMBER`
|
||||
PULL_JSON=`curl -H "$GH_AUTH" -s https://api.github.com/repos/angular/angular/pulls/$PR_NUMBER`
|
||||
PR_SHA_COUNT=`node $BASEDIR/utils/json_extract.js commits <<< """$PULL_JSON"""`
|
||||
STATUS_JSON_URL=`node $BASEDIR/utils/json_extract.js _links.statuses.href <<< """$PULL_JSON"""`
|
||||
STATUS=`$GHCURL -s $STATUS_JSON_URL | node $BASEDIR/utils/json_extract.js description | cut -d '|' -f1`
|
||||
PR_LABELS=`$GHCURL -s https://api.github.com/repos/angular/angular/issues/$PR_NUMBER/labels`
|
||||
STATUS=`curl -H "$GH_AUTH" -s $STATUS_JSON_URL | node $BASEDIR/utils/json_extract.js description | cut -d '|' -f1`
|
||||
PR_LABELS=`curl -H "$GH_AUTH" -s https://api.github.com/repos/angular/angular/issues/$PR_NUMBER/labels`
|
||||
PR_ACTION=`echo "$PR_LABELS" | node $BASEDIR/utils/json_extract.js "name=^PR action:"`
|
||||
PR_TARGET=`echo "$PR_LABELS" | node $BASEDIR/utils/json_extract.js "name=^PR target:"`
|
||||
PR_CLA=`echo "$PR_LABELS" | node $BASEDIR/utils/json_extract.js "name=^cla"`
|
||||
|
@ -62,6 +62,7 @@ System.config({
|
||||
'@angular/platform-server': {main: 'index.js', defaultExtension: 'js'},
|
||||
'@angular/platform-webworker': {main: 'index.js', defaultExtension: 'js'},
|
||||
'@angular/platform-webworker-dynamic': {main: 'index.js', defaultExtension: 'js'},
|
||||
'@angular/private/testing': {main: 'index.js', defaultExtension: 'js'},
|
||||
'@angular/elements': {main: 'index.js', defaultExtension: 'js'},
|
||||
'rxjs/ajax': {main: 'index.js', defaultExtension: 'js'},
|
||||
'rxjs/operators': {main: 'index.js', defaultExtension: 'js'},
|
||||
|
@ -5,6 +5,7 @@ load("//packages/bazel:index.bzl", _ng_module = "ng_module", _ng_package = "ng_p
|
||||
load("//packages/bazel/src:ng_module.bzl", _internal_global_ng_module = "internal_global_ng_module")
|
||||
|
||||
DEFAULT_TSCONFIG = "//packages:tsconfig-build.json"
|
||||
DEFAULT_NODE_MODULES = "@angular_deps//:node_modules"
|
||||
|
||||
# Packages which are versioned together on npm
|
||||
ANGULAR_SCOPED_PACKAGES = ["@angular/%s" % p for p in [
|
||||
@ -37,17 +38,17 @@ PKG_GROUP_REPLACEMENTS = {
|
||||
]""" % ",\n ".join(["\"%s\"" % s for s in ANGULAR_SCOPED_PACKAGES])
|
||||
}
|
||||
|
||||
def ts_library(tsconfig = None, **kwargs):
|
||||
def ts_library(tsconfig = None, node_modules = DEFAULT_NODE_MODULES, **kwargs):
|
||||
if not tsconfig:
|
||||
tsconfig = DEFAULT_TSCONFIG
|
||||
_ts_library(tsconfig = tsconfig, **kwargs)
|
||||
_ts_library(tsconfig = tsconfig, node_modules = node_modules, **kwargs)
|
||||
|
||||
def ng_module(name, tsconfig = None, entry_point = None, **kwargs):
|
||||
def ng_module(name, tsconfig = None, entry_point = None, node_modules = DEFAULT_NODE_MODULES, **kwargs):
|
||||
if not tsconfig:
|
||||
tsconfig = DEFAULT_TSCONFIG
|
||||
if not entry_point:
|
||||
entry_point = "public_api.ts"
|
||||
_ng_module(name = name, flat_module_out_file = name, tsconfig = tsconfig, entry_point = entry_point, **kwargs)
|
||||
_ng_module(name = name, flat_module_out_file = name, tsconfig = tsconfig, entry_point = entry_point, node_modules = node_modules, **kwargs)
|
||||
|
||||
# ivy_ng_module behaves like ng_module, and under --define=compile=legacy it runs ngc with global
|
||||
# analysis but produces Ivy outputs. Under other compile modes, it behaves as ng_module.
|
||||
@ -82,7 +83,7 @@ def ts_web_test_suite(bootstrap = [], deps = [], **kwargs):
|
||||
if not bootstrap:
|
||||
bootstrap = ["//:web_test_bootstrap_scripts"]
|
||||
local_deps = [
|
||||
"//:node_modules/tslib/tslib.js",
|
||||
"@angular_deps//:node_modules/tslib/tslib.js",
|
||||
"//tools/testing:browser",
|
||||
] + deps
|
||||
|
||||
|
240
tools/ng_setup_workspace.bzl
Normal file
240
tools/ng_setup_workspace.bzl
Normal file
@ -0,0 +1,240 @@
|
||||
# Copyright Google Inc. All Rights Reserved.
|
||||
#
|
||||
# Use of this source code is governed by an MIT-style license that can be
|
||||
# found in the LICENSE file at https://angular.io/license
|
||||
|
||||
"Install angular source dependencies"
|
||||
|
||||
load("@build_bazel_rules_nodejs//:defs.bzl", "yarn_install")
|
||||
load("@angular//packages/bazel/src:ng_setup_workspace.bzl", _ng_setup_workspace = "ng_setup_workspace")
|
||||
|
||||
def ng_setup_workspace():
|
||||
"""This repository rule should be called from your WORKSPACE file.
|
||||
|
||||
It creates some additional Bazel external repositories that are used internally
|
||||
to build angular
|
||||
"""
|
||||
yarn_install(
|
||||
name = "angular_deps",
|
||||
package_json = "@angular//:package.json",
|
||||
yarn_lock = "@angular//:yarn.lock",
|
||||
data = ["@angular//:tools/yarn/check-yarn.js", "@angular//:tools/postinstall-patches.js"],
|
||||
node_modules_filegroup = """
|
||||
filegroup(
|
||||
name = "node_modules",
|
||||
srcs = glob(["/".join([
|
||||
"node_modules",
|
||||
pkg,
|
||||
"**",
|
||||
ext,
|
||||
]) for pkg in [
|
||||
"adm-zip",
|
||||
"ajv",
|
||||
"angular",
|
||||
"angular-1.5",
|
||||
"angular-1.6",
|
||||
"angular-mocks",
|
||||
"angular-mocks-1.5",
|
||||
"angular-mocks-1.6",
|
||||
"anymatch",
|
||||
"arr-diff",
|
||||
"arr-flatten",
|
||||
"arr-union",
|
||||
"array-unique",
|
||||
"asn1",
|
||||
"assert-plus",
|
||||
"assign-symbols",
|
||||
"async-each",
|
||||
"asynckit",
|
||||
"atob",
|
||||
"aws-sign2",
|
||||
"aws4",
|
||||
"balanced-match",
|
||||
"base",
|
||||
"base64-js",
|
||||
"binary-extensions",
|
||||
"blocking-proxy",
|
||||
"brace-expansion",
|
||||
"braces",
|
||||
"bytebuffer",
|
||||
"cache-base",
|
||||
"caseless",
|
||||
"chokidar",
|
||||
"class-utils",
|
||||
"co",
|
||||
"collection-visit",
|
||||
"combined-stream",
|
||||
"component-emitter",
|
||||
"concat-map",
|
||||
"copy-descriptor",
|
||||
"core-util-is",
|
||||
"debug",
|
||||
"decode-uri-component",
|
||||
"define-property",
|
||||
"delayed-stream",
|
||||
"domino",
|
||||
"expand-brackets",
|
||||
"expand-range",
|
||||
"extend",
|
||||
"extend-shallow",
|
||||
"extglob",
|
||||
"extsprintf",
|
||||
"fast-deep-equal",
|
||||
"fast-json-stable-stringify",
|
||||
"filename-regex",
|
||||
"fill-range",
|
||||
"for-in",
|
||||
"for-own",
|
||||
"forever-agent",
|
||||
"form-data",
|
||||
"fragment-cache",
|
||||
"fs.realpath",
|
||||
"get-value",
|
||||
"glob",
|
||||
"glob-base",
|
||||
"glob-parent",
|
||||
"graceful-fs",
|
||||
"hammerjs",
|
||||
"har-schema",
|
||||
"har-validator",
|
||||
"has-value",
|
||||
"has-values",
|
||||
"http-signature",
|
||||
"https-proxy-agent",
|
||||
"inflight",
|
||||
"inherits",
|
||||
"is-accessor-descriptor",
|
||||
"is-binary-path",
|
||||
"is-buffer",
|
||||
"is-data-descriptor",
|
||||
"is-descriptor",
|
||||
"is-dotfile",
|
||||
"is-equal-shallow",
|
||||
"is-extendable",
|
||||
"is-extglob",
|
||||
"is-glob",
|
||||
"is-number",
|
||||
"is-plain-object",
|
||||
"is-posix-bracket",
|
||||
"is-primitive",
|
||||
"is-typedarray",
|
||||
"is-windows",
|
||||
"isarray",
|
||||
"isobject",
|
||||
"isstream",
|
||||
"jasmine",
|
||||
"jasmine-core",
|
||||
"jasminewd2",
|
||||
"json-schema",
|
||||
"json-schema-traverse",
|
||||
"json-stable-stringify",
|
||||
"json-stringify-safe",
|
||||
"jsprim",
|
||||
"kind-of",
|
||||
"long",
|
||||
"lru-cache",
|
||||
"map-cache",
|
||||
"map-visit",
|
||||
"math-random",
|
||||
"micromatch",
|
||||
"mime-db",
|
||||
"mime-types",
|
||||
"minimatch",
|
||||
"minimist",
|
||||
"mixin-deep",
|
||||
"nanomatch",
|
||||
"normalize-path",
|
||||
"oauth-sign",
|
||||
"object.omit",
|
||||
"object.pick",
|
||||
"object-copy",
|
||||
"object-visit",
|
||||
"once",
|
||||
"optimist",
|
||||
"options",
|
||||
"os-tmpdir",
|
||||
"parse-glob",
|
||||
"pascalcase",
|
||||
"path-dirname",
|
||||
"path-is-absolute",
|
||||
"performance-now",
|
||||
"posix-character-classes",
|
||||
"preserve",
|
||||
"process-nextick-args",
|
||||
"protobufjs",
|
||||
"protractor",
|
||||
"qs",
|
||||
"randomatic",
|
||||
"readable-stream",
|
||||
"readdirp",
|
||||
"reflect-metadata",
|
||||
"regex-cache",
|
||||
"regex-not",
|
||||
"remove-trailing-separator",
|
||||
"repeat-element",
|
||||
"repeat-string",
|
||||
"request",
|
||||
"ret",
|
||||
"rimraf",
|
||||
"safe-buffer",
|
||||
"safe-regex",
|
||||
"safer-buffer",
|
||||
"sax",
|
||||
"semver",
|
||||
"set-immediate-shim",
|
||||
"set-value",
|
||||
"shelljs",
|
||||
"sigmund",
|
||||
"snapdragon",
|
||||
"snapdragon-node",
|
||||
"snapdragon-util",
|
||||
"source-map",
|
||||
"source-map-resolve",
|
||||
"source-map-support",
|
||||
"source-map-url",
|
||||
"split-string",
|
||||
"sshpk",
|
||||
"static-extend",
|
||||
"stringstream",
|
||||
"tmp",
|
||||
"to-object-path",
|
||||
"to-regex",
|
||||
"to-regex-range",
|
||||
"tough-cookie",
|
||||
"tsickle",
|
||||
"tslib",
|
||||
"tsutils",
|
||||
"tunnel-agent",
|
||||
"typescript",
|
||||
"union-value",
|
||||
"unset-value",
|
||||
"upath",
|
||||
"uri-js",
|
||||
"urix",
|
||||
"use",
|
||||
"util-deprecate",
|
||||
"uuid",
|
||||
"verror",
|
||||
"webdriver-js-extender",
|
||||
"webdriver-manager",
|
||||
"wordwrap",
|
||||
"wrappy",
|
||||
"xhr2",
|
||||
"xml2js",
|
||||
"xmlbuilder",
|
||||
"zone.js",
|
||||
"@angular-devkit/core",
|
||||
"@angular-devkit/schematics",
|
||||
"@types",
|
||||
"@webcomponents/custom-elements",
|
||||
] for ext in [
|
||||
"*.js",
|
||||
"*.json",
|
||||
"*.d.ts",
|
||||
]] + [
|
||||
"node_modules/protractor/**",
|
||||
"node_modules/@schematics/angular/**",
|
||||
]))
|
||||
""")
|
||||
|
||||
_ng_setup_workspace()
|
@ -6,6 +6,19 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
try {
|
||||
require.resolve('shelljs');
|
||||
} catch (e) {
|
||||
// We are in an bazel managed external node_modules repository
|
||||
// and the resolve has failed because node did not preserve the symlink
|
||||
// when loading the script.
|
||||
// This can be fixed using the --preserve-symlinks-main flag which
|
||||
// is introduced in node 10.2.0
|
||||
console.warn(
|
||||
'Running postinstall-patches.js script in an external repository requires --preserve-symlinks-main node flag introduced in node 10.2.0');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
const {set, cd, sed, rm} = require('shelljs');
|
||||
const path = require('path');
|
||||
const log = console.log;
|
||||
|
@ -102,7 +102,7 @@ export interface AnimationPlayer {
|
||||
play(): void;
|
||||
reset(): void;
|
||||
restart(): void;
|
||||
setPosition(p: any /** TODO #9100 */): void;
|
||||
setPosition(position: any /** TODO #9100 */): void;
|
||||
}
|
||||
|
||||
export interface AnimationQueryMetadata extends AnimationMetadata {
|
||||
@ -191,7 +191,7 @@ export declare class NoopAnimationPlayer implements AnimationPlayer {
|
||||
play(): void;
|
||||
reset(): void;
|
||||
restart(): void;
|
||||
setPosition(p: number): void;
|
||||
setPosition(position: number): void;
|
||||
}
|
||||
|
||||
export declare function query(selector: string, animation: AnimationMetadata | AnimationMetadata[], options?: AnimationQueryOptions | null): AnimationQueryMetadata;
|
||||
|
2
tools/public_api_guard/core/core.d.ts
vendored
2
tools/public_api_guard/core/core.d.ts
vendored
@ -23,10 +23,8 @@ export declare const APP_BOOTSTRAP_LISTENER: InjectionToken<((compRef: Component
|
||||
/** @experimental */
|
||||
export declare const APP_ID: InjectionToken<string>;
|
||||
|
||||
/** @experimental */
|
||||
export declare const APP_INITIALIZER: InjectionToken<(() => void)[]>;
|
||||
|
||||
/** @experimental */
|
||||
export declare class ApplicationInitStatus {
|
||||
readonly done: boolean;
|
||||
readonly donePromise: Promise<any>;
|
||||
|
9
tools/public_api_guard/core/testing.d.ts
vendored
9
tools/public_api_guard/core/testing.d.ts
vendored
@ -1,8 +1,5 @@
|
||||
export declare function async(fn: Function): (done: any) => any;
|
||||
|
||||
/** @experimental */
|
||||
export declare function cleanupDocument(): void;
|
||||
|
||||
export declare class ComponentFixture<T> {
|
||||
changeDetectorRef: ChangeDetectorRef;
|
||||
componentInstance: T;
|
||||
@ -30,9 +27,6 @@ export declare const ComponentFixtureNoNgZone: InjectionToken<boolean[]>;
|
||||
/** @experimental */
|
||||
export declare function discardPeriodicTasks(): void;
|
||||
|
||||
/** @experimental */
|
||||
export declare function ensureDocument(): void;
|
||||
|
||||
/** @experimental */
|
||||
export declare function fakeAsync(fn: Function): (...args: any[]) => any;
|
||||
|
||||
@ -147,9 +141,6 @@ export declare type TestModuleMetadata = {
|
||||
/** @experimental */
|
||||
export declare function tick(millis?: number): void;
|
||||
|
||||
/** @experimental */
|
||||
export declare function withBody<T>(html: string, blockFn: T): T;
|
||||
|
||||
/** @experimental */
|
||||
export declare function withModule(moduleDef: TestModuleMetadata): InjectSetupWrapper;
|
||||
export declare function withModule(moduleDef: TestModuleMetadata, fn: Function): () => any;
|
||||
|
@ -42,7 +42,9 @@ export function publicApi(fileName: string, options: SerializationOptions = {}):
|
||||
export function publicApiInternal(
|
||||
host: ts.CompilerHost, fileName: string, tsOptions: ts.CompilerOptions,
|
||||
options: SerializationOptions = {}): string {
|
||||
const entrypoint = path.normalize(fileName);
|
||||
// Since the entry point will be compared with the source files from the TypeScript program,
|
||||
// the path needs to be normalized with forward slashes in order to work within Windows.
|
||||
const entrypoint = path.normalize(fileName).replace(/\\/g, '/');
|
||||
|
||||
if (!entrypoint.match(/\.d\.ts$/)) {
|
||||
throw new Error(`Source file "${fileName}" is not a declaration file`);
|
||||
|
2
tools/types-ext/jasminewd2.d.ts
vendored
2
tools/types-ext/jasminewd2.d.ts
vendored
@ -6,6 +6,8 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
/// <reference types="jasminewd2" />
|
||||
|
||||
/**
|
||||
* Extended typings for `jasminewd2`.
|
||||
*
|
||||
|
6
tools/types.d.ts
vendored
6
tools/types.d.ts
vendored
@ -1,5 +1,5 @@
|
||||
// This file contains all ambient imports needed to compile the tools source code
|
||||
|
||||
/// <reference path="../node_modules/@types/jasmine/index.d.ts" />
|
||||
/// <reference path="../node_modules/@types/node/index.d.ts" />
|
||||
/// <reference path="../node_modules/zone.js/dist/zone.js.d.ts" />
|
||||
/// <reference types="jasmine" />
|
||||
/// <reference types="node" />
|
||||
/// <reference types="zone.js" />
|
||||
|
Reference in New Issue
Block a user