Commit Graph

366 Commits

Author SHA1 Message Date
YuCheng Hu ea5de990f7 提交代码进行测试 2021-04-05 12:11:12 -04:00
YuCheng Hu 895f2fe818 针对新的版本提交没有提交的代码 2021-04-03 09:52:53 -04:00
Zhicheng WANG 3b428a1118 docs: 翻译 API 文档 2021-02-04 21:56:10 +08:00
Zhicheng WANG d4b884fe17 Merge remote-tracking branch 'en/master' into aio
# Conflicts:
#	aio/content/cli/index.md
#	aio/content/guide/accessibility.md
#	aio/content/guide/ajs-quick-reference.md
#	aio/content/guide/angular-compiler-options.md
#	aio/content/guide/animations.md
#	aio/content/guide/aot-compiler.md
#	aio/content/guide/architecture-components.md
#	aio/content/guide/architecture-modules.md
#	aio/content/guide/architecture-next-steps.md
#	aio/content/guide/architecture-services.md
#	aio/content/guide/attribute-directives.md
#	aio/content/guide/bootstrapping.md
#	aio/content/guide/browser-support.md
#	aio/content/guide/cli-builder.md
#	aio/content/guide/comparing-observables.md
#	aio/content/guide/component-styles.md
#	aio/content/guide/creating-libraries.md
#	aio/content/guide/dependency-injection-in-action.md
#	aio/content/guide/dependency-injection-navtree.md
#	aio/content/guide/dependency-injection-providers.md
#	aio/content/guide/dependency-injection.md
#	aio/content/guide/deployment.md
#	aio/content/guide/deprecations.md
#	aio/content/guide/displaying-data.md
#	aio/content/guide/dynamic-component-loader.md
#	aio/content/guide/elements.md
#	aio/content/guide/file-structure.md
#	aio/content/guide/glossary.md
#	aio/content/guide/http.md
#	aio/content/guide/i18n.md
#	aio/content/guide/ivy-compatibility.md
#	aio/content/guide/language-service.md
#	aio/content/guide/lifecycle-hooks.md
#	aio/content/guide/module-types.md
#	aio/content/guide/ngmodule-faq.md
#	aio/content/guide/ngmodule-vs-jsmodule.md
#	aio/content/guide/ngmodules.md
#	aio/content/guide/observables-in-angular.md
#	aio/content/guide/pipes.md
#	aio/content/guide/providers.md
#	aio/content/guide/releases.md
#	aio/content/guide/route-animations.md
#	aio/content/guide/router-tutorial.md
#	aio/content/guide/router.md
#	aio/content/guide/rx-library.md
#	aio/content/guide/schematics-authoring.md
#	aio/content/guide/schematics-for-libraries.md
#	aio/content/guide/service-worker-config.md
#	aio/content/guide/service-worker-getting-started.md
#	aio/content/guide/structural-directives.md
#	aio/content/guide/styleguide.md
#	aio/content/guide/template-syntax.md
#	aio/content/guide/template-typecheck.md
#	aio/content/guide/testing.md
#	aio/content/guide/typescript-configuration.md
#	aio/content/guide/upgrade-setup.md
#	aio/content/guide/user-input.md
#	aio/content/guide/using-libraries.md
#	aio/content/guide/web-worker.md
#	aio/content/guide/workspace-config.md
#	aio/content/marketing/docs.md
#	aio/content/marketing/events.html
#	aio/content/navigation.json
#	aio/content/start/index.md
#	aio/content/start/start-data.md
#	aio/content/start/start-deployment.md
#	aio/content/tutorial/toh-pt2.md
#	aio/content/tutorial/toh-pt4.md
#	aio/package.json
#	aio/src/app/app.component.ts
#	aio/src/app/layout/footer/footer.component.html
#	aio/src/app/shared/custom-icon-registry.ts
#	aio/src/environments/environment.stable.ts
#	aio/tools/stackblitz-builder/builder.js
#	aio/tools/transforms/angular-content-package/index.js
#	aio/tools/transforms/templates/api/lib/memberHelpers.html
#	aio/yarn.lock
#	integration/ng_elements/e2e/app.e2e-spec.ts
#	integration/ng_elements/src/app.ts
#	packages/common/src/pipes/date_pipe.ts
#	packages/core/src/metadata/directives.ts
#	packages/core/src/metadata/ng_module.ts
#	packages/core/src/render/api.ts
#	packages/forms/src/directives/ng_model.ts
#	packages/forms/src/form_builder.ts
#	packages/forms/src/model.ts
#	packages/platform-browser/src/browser.ts
#	packages/router/src/config.ts
#	packages/router/src/directives/router_link.ts
#	packages/router/src/directives/router_link_active.ts
#	packages/router/src/events.ts
#	packages/router/src/router.ts
#	packages/router/src/router_module.ts
#	packages/router/src/router_state.ts
2020-12-04 20:22:11 +08:00
INFRAGISTICS\tiliev b5c0f9d7d1 feat(platform-browser): add doubletap HammerJS support (#26362)
Enables `doubletap` support in HammerJS.

PR Close  #23954

PR Close #26362
2020-11-24 08:45:49 -08:00
Marcono1234 3e1e5a15ba docs: update links to use HTTPS as protocol (#39718)
PR Close #39718
2020-11-20 12:52:16 -08:00
Kara Erickson ff0a90e4a8 fix(core): meta addTag() adds incorrect attribute for httpEquiv (#32531)
Meta::addTag() adds a meta tag with httpEquiv attribute instead of http-equiv when
MetaDefinition contains httpEquiv property.

PR Close #32531
2020-11-20 09:26:08 -08:00
JiaLiPassion 5e92d649f2 feat(core): add shouldCoalesceRunChangeDetection option to coalesce change detections in the same event loop. (#39422)
Close #39348

Now `NgZone` has an option `shouldCoalesceEventChangeDetection` to coalesce
multiple event handler's change detections to one async change detection.

And there are some cases other than `event handler` have the same issues.
In #39348, the case like this.

```
// This code results in one change detection occurring per
// ngZone.run() call. This is entirely feasible, and can be a serious
// performance issue.
for (let i = 0; i < 100; i++) {
  this.ngZone.run(() => {
    // do something
  });
}
```

So such kind of case will trigger multiple change detections.
And now with Ivy, we have a new `markDirty()` API will schedule
a requestAnimationFrame to trigger change detection and also coalesce
the change detections in the same event loop, `markDirty()` API doesn't
only take care `event handler` but also all other cases `sync/macroTask/..`

So this PR add a new option to coalesce change detections for all cases.

test(core): add test case for shouldCoalesceEventChangeDetection option

Add new test cases for current `shouldCoalesceEventChangeDetection` in `ng_zone.spec`, since
currently we only have integration test for this one.

PR Close #39422
2020-11-16 08:58:50 -08:00
Kristiyan Kostadinov 44763245e1 fix(core): handle !important in style property value (#39603)
* Fixes that the Ivy styling logic wasn't accounting for `!important` in the property value.
* Fixes that the default DOM renderer only sets `!important` on a property with a dash in its name.
* Accounts for the `flags` parameter of `setStyle` in the server renderer.

Fixes #35323.

PR Close #39603
2020-11-12 09:11:18 -08:00
Misko Hevery ca11ef2376 fix(core): Store ICU state in `LView` rather than in `TView` (#39233)
Before this refactoring/fix the ICU would store the current selected
index in `TView`. This is incorrect, since if ICU is in `ngFor` it will
cause issues in some circumstances. This refactoring properly moves the
state to `LView`.

closes #37021
closes #38144
closes #38073

PR Close #39233
2020-10-21 18:33:00 -07:00
Bjarki 9ec2bad4dc refactor(core): make HTML sanitizer return TrustedHTML (#39218)
Make Angular's HTML sanitizer return a TrustedHTML, as its output is
trusted not to cause XSS vulnerabilities when used in a context where a
browser may parse and evaluate HTML. Also update tests to reflect the
new behaviour.

PR Close #39218
2020-10-16 08:13:52 -07:00
Andrew Kushnir 8fd25d9614 docs: remove IE10 references from comments in the code (#39090)
PR Close #39090
2020-10-13 15:51:49 -07:00
Andrew Kushnir 61e6ca9b1f test(platform-browser): remove IE9 and IE10 checks from tests (#39090)
This commit removes IE 9 and IE 10 checks from the browser detection spec.
Also unblocks tests that were previously disabled due to issues in IE10.

PR Close #39090
2020-10-13 15:51:48 -07:00
Kristiyan Kostadinov 4a1c12c773 feat(core): remove ViewEncapsulation.Native (#38882)
Removes `ViewEncapsulation.Native` which has been deprecated for several major versions.

BREAKING CHANGES:
* `ViewEncapsulation.Native` has been removed. Use `ViewEncapsulation.ShadowDom` instead. Existing
usages will be updated automatically by `ng update`.

PR Close #38882
2020-10-08 11:56:03 -07:00
Joey Perrott f979914d4e test(platform-browser): remove usage of blacklist in test naming (#38928)
Remove usage of blacklist in test name.

PR Close #38928
2020-09-23 15:47:28 -04:00
Adrian Rutkowski c8f056beb6 fix(core): ensure TestBed is not instantiated before override provider (#38717)
There is an inconsistency in overrideProvider behaviour. Testing documentation says
(https://angular.io/guide/testing-components-basics#createcomponent) that all override...
methods throw error if TestBed is already instantiated. However overrideProvider doesn't throw any error, but (same as
other override... methods) doesn't replace providers if TestBed is instantiated. Add TestBed instantiation check to
overrideProvider method to make it consistent.

BREAKING CHANGE:

If you call `TestBed.overrideProvider` after TestBed initialization, provider overrides are not applied. This
behavior is consistent with other override methods (such as `TestBed.overrideDirective`, etc) but they
throw an error to indicate that, when the check was missing in the `TestBed.overrideProvider` function.
Now calling `TestBed.overrideProvider` after TestBed initialization also triggers an
error, thus there is a chance that some tests (where `TestBed.overrideProvider` is
called after TestBed initialization) will start to fail and require updates to move `TestBed.overrideProvider` calls
before TestBed initialization is completed.

Issue mentioned here: https://github.com/angular/angular/issues/13460#issuecomment-636005966
Documentation: https://angular.io/guide/testing-components-basics#createcomponent

PR Close #38717
2020-09-22 15:03:44 -07:00
Sonu Kapoor 0c2490368e refactor(platform-browser): specify return type of parseEventName (#38089)
This commit refactors the argument of the `parseEventName` function
to use an object with named properties instead of using an object indexer.

PR Close #38089
2020-08-05 17:06:28 -07:00
JiaLiPassion 8fbf40bf40 feat(core): update reference and doc to change `async` to `waitAsync`. (#37583)
The last commit change `async` to `waitForAsync`.
This commit update all usages in the code and also update aio doc.

PR Close #37583
2020-08-03 12:54:13 -07:00
Misko Hevery cf4da82ac3 Revert "refactor(platform-browser): specify return type of parseEventName (#38089)"
This reverts commit 174aac68f7.
2020-07-29 09:30:11 -07:00
Sonu Kapoor 174aac68f7 refactor(platform-browser): specify return type of parseEventName (#38089)
This commit refactors the argument of the `parseEventName` function
to use an object with named properties instead of using an object indexer.

PR Close #38089
2020-07-27 15:24:59 -07:00
Zhicheng WANG 4eb5431162 fix: merge from v10.0 2020-06-28 10:47:43 +08:00
Zhicheng WANG 8675bc5719 docs: 合并远端更新
初步合并了冲突,尚未校验,四个改动很大的章节暂时改回了英文版
2020-06-12 18:18:15 +08:00
Judy Bogart 886e3ebcca docs: update api ref doc for platform browser (#37186)
Edit descriptions, usage examples, and add links to be complete and consistent with API reference doc style

PR Close #37186
2020-06-11 18:59:12 -07:00
JiaLiPassion 284123c6ba fix(core): should fake a top event task when coalescing events to prevent draining microTaskQueue too early. (#36841)
Close #36839.

This is a known issue of zone.js,

```
(window as any)[(Zone as any).__symbol__('setTimeout')](() => {
  let log = '';
  button.addEventListener('click', () => {
    Zone.current.scheduleMicroTask('test', () => log += 'microtask;');
    log += 'click;';
  });
  button.click();
  expect(log).toEqual('click;microtask;');
  done();
});
```

Since in this case, we use native `setTimeout` which is not a ZoneTask,
so zone.js consider the button click handler as the top Task then drain the
microTaskQueue after the click at once, which is not correct(too early).

This case was an edge case and not reported by the users, until we have the
new option ngZoneEventCoalescing, since the event coalescing will happen
in native requestAnimationFrame, so it will not be a ZoneTask, and zone.js will
consider any Task happen in the change detection stage as the top task, and if
there are any microTasks(such as Promise.then) happen in the process, it may be
drained earlier than it should be, so to prevent this situation, we need to schedule
a fake event task and run the change detection check in this fake event task,
so the Task happen in the change detection stage will not be
considered as top ZoneTask.

PR Close #36841
2020-06-11 18:54:22 -07:00
Joey Perrott 0a1d078a74 Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495)
This reverts commit 26849ca99d.

PR Close #37495
2020-06-10 08:21:45 -07:00
Joey Perrott 26849ca99d build: remove wombot proxy registry from package.jsons for release (#37378)
Due to an outage with the proxy we rely on for publishing, we need
to temporarily directly publish to NPM using our own angular
credentials again.

PR Close #37378
2020-06-01 12:41:19 -04:00
Joey Perrott d1ea1f4c7f build: update license headers to reference Google LLC (#37205)
Update the license headers throughout the repository to reference Google LLC
rather than Google Inc, for the required license headers.

PR Close #37205
2020-05-26 14:26:58 -04:00
Alan Agius 772c5b8f64 refactor: update to tslib 2.0 and move to direct dependencies (#37198)
Tslib version is bound to the TypeScript version used to compile the library. Thus, we shouldn't list `tslib` as a  `peerDependencies`. This is because, a user can install libraries which have been compiled with older versions of TypeScript and thus require multiple `tslib` versions to be installed.

Reference: TOOL-1374 and TOOL-1375

Closes: #37188

PR Close #37198
2020-05-19 14:57:09 -07:00
Matias Niemelä 420b9be1c1 refactor: disable sanitization for [style] and [style.prop] bindings (#35621)
This patch is the first of many commits to disable sanitization for
[stlye.prop] and [style] bindings in Angular.

Historically, style-based sanitization has only been required for old
IE browsers (IE6 and IE7). Since Angular does not support these old
browsers at all, there is no reason for the framework to support
style-based sanitization.

PR Close #35621
2020-05-06 15:00:22 -07:00
Igor Minar d578ab8f3c build: simplify package.jsons for all of our packages (#36944)
We can remove all of the entry point resolution configuration from the package.json
in our source code as ng_package rule adds the properties automatically and correctly
configures them.

This change simplifies our code base but doesn't have any impact on the package.json
in the distributed npm_packages.

PR Close #36944
2020-05-06 13:54:26 -07:00
crisbeto 9d9d46f52b fix(core): log error instead of warning for unknown properties and elements (#36399)
Changes the Ivy unknown element/property messages from being logged with `console.warn` to `console.error`. This should make them a bit more visible without breaking existing apps. Furthermore, a lot of folks filter out warning messages in the dev tools' console, whereas errors are usually still shown.

BREAKING CHANGE:
Warnings about unknown elements are now logged as errors. This won't break your app, but it may trip up tools that expect nothing to be logged via `console.error`.

Fixes #35699.

PR Close #36399
2020-05-04 12:37:42 -07:00
crisbeto a6a7e1bb99 build: enable platform-browser tests on Saucelabs (#36797)
Enables some passing `platform-browser` tests on Saucelabs. The reason they were disabled was an error log which doesn't actually fail the test run and has been there for a long time.

PR Close #36797
2020-04-28 15:10:27 -07:00
Joey Perrott 698b0288be build: reformat repo to new clang@1.4.0 (#36613)
PR Close #36613
2020-04-14 12:08:36 -07:00
Greg Magolan d50cb30443 test: disable failing saucelabs tests (#36620)
PR Close #36620
2020-04-14 10:13:33 -07:00
JiaLiPassion 41667de778 fix(zone.js): add issue numbers of `@types/jasmine` to the test cases (#34625)
Some cases will still need to use `spy as any` cast, because `@types/jasmine` have some issues,
1. The issue jasmine doesn't handle optional method properties, https://github.com/DefinitelyTyped/DefinitelyTyped/issues/43486
2. The issue jasmine doesn't handle overload method correctly, https://github.com/DefinitelyTyped/DefinitelyTyped/issues/42455

PR Close #34625
2020-04-08 12:10:34 -07:00
JiaLiPassion ef4736d052 build: update jasmine to 3.5 (#34625)
1. update jasmine to 3.5
2. update @types/jasmine to 3.5
3. update @types/jasminewd2 to 2.0.8

Also fix several cases, the new jasmine 3 will help to create test cases correctly,
such as in the `jasmine 2.x` version, the following case will pass

```
expect(1 == 2);
```

But in jsamine 3, the case will need to be

```
expect(1 == 2).toBeTrue();
```

PR Close #34625
2020-04-08 12:10:34 -07:00
Alan Agius 2e493edf80 build: provide full paths to `ts_api_guardian_test_npm_package` and `ts_api_guardian_test` (#36034)
ts-api-guardian uses `require.resolve` to resolve the actual and golden files under bazel. In Windows for these files to be resolved correct the full path including the workspace name as per the MANIFEST entries is required.

This used to be the case until the recent changes done to use npm_integration tests

83c74ceacf/tools/public_api_guard/public_api_guard.bzl (L19)
83c74ceacf/tools/public_api_guard/public_api_guard.bzl (L28)

```
bazel test //packages/... --test_tag_filters=api_guard

//packages/animations:animations_api                            (cached) PASSED in 18.4s
//packages/common:common_api                                    (cached) PASSED in 25.5s
//packages/compiler-cli:compiler_options_api                    (cached) PASSED in 12.4s
//packages/compiler-cli:error_code_api                          (cached) PASSED in 11.6s
//packages/core:core_api                                        (cached) PASSED in 20.6s
//packages/core:ng_global_utils_api                             (cached) PASSED in 13.5s
//packages/elements:elements_api                                (cached) PASSED in 11.9s
//packages/forms:forms_api                                      (cached) PASSED in 13.9s
//packages/http:http_api                                        (cached) PASSED in 14.8s
//packages/localize:localize_api                                (cached) PASSED in 6.3s
//packages/platform-browser:platform-browser_api                (cached) PASSED in 18.1s
//packages/platform-browser-dynamic:platform-browser-dynamic_api (cached) PASSED in 14.0s
//packages/platform-server:platform-server_api                  (cached) PASSED in 13.9s
//packages/platform-webworker:platform-webworker_api            (cached) PASSED in 13.7s
//packages/platform-webworker-dynamic:platform-webworker-dynamic_api (cached) PASSED in 11.7s
//packages/router:router_api                                    (cached) PASSED in 19.9s
//packages/service-worker:service-worker_api                    (cached) PASSED in 18.1s
//packages/upgrade:upgrade_api                                  (cached) PASSED in 13.5s
```

Reference: DEV-71

PR Close #36034
2020-03-12 09:49:00 -07:00
Joey Perrott 15f8afa4bf ci: move public-api goldens to goldens directory (#35768)
Moves the public api .d.ts files from tools/public_api_guard to
goldens/public-api.

Additionally, provides a README in the goldens directory and a script
assist in testing the current state of the repo against the goldens as
well as a command for accepting all changes to the goldens in a single
command.

PR Close #35768
2020-03-10 20:58:39 -04:00
Alan Agius 64d6f13b87 fix(platform-browser): add missing peerDependency on `@angular/animations` (#35949)
`@angular/platform-browser/animations` has a dependency on `@angular/animations` however, this is not listed in `peerDependencies`

With this change we add this package as an optional peerDependency as it's only required when using the `@angular/platform-browser/animations` entrypoint.

Fixes #35888

PR Close #35949
2020-03-10 13:28:32 -04:00
Andrew Scott d543b13e5c Revert "fix(core): log error instead of warning for unknown properties and elements (#35798)" (#35845)
This reverts commit 00f3c58bb9.
Rolling back because it could be breaking e2e tests that assert that
there are no errors in the console after the assertions have run. We can
re-add this in v10.

PR Close #35845
2020-03-03 16:02:58 -08:00
crisbeto 00f3c58bb9 fix(core): log error instead of warning for unknown properties and elements (#35798)
Changes the Ivy unknown element/property messages from being logged with `console.warn` to `console.error`. This should make them a bit more visible without breaking existing apps. Furthermore, a lot of folks filter out warning messages in the dev tools' console, whereas errors are usually still shown.

Fixes #35699.

PR Close #35798
2020-03-03 13:55:22 -08:00
Felix Becker 1e20b2ca36 build(packaging): add repository.directory field to package.jsons (#27544)
PR Close #27544
2020-02-25 13:12:45 -08:00
Rado Kirov 294e56d529 refactor(platform-browser): Hoist functions to workaround optimization bug. (#32230)
Technically, function definitions can live anywhere because they are
hoisted. However, in this case Closure optimizations break when exported
function definitions are referred in another static object that is
exported.

The bad pattern is:
```
exports const obj = {f};
export function f() {...}
```

which turns to the following in Closure's module system:
```
goog.module('m');

exports.obj = {f};

function f() {...}
exports.f = f;
```

which badly optimizes to (note module objects are collapsed)
```
var b = a; var a = function() {...};  // now b is undefined.
```

This is an optimizer bug and should be fixed in Closure, but in the
meantime this change is a noop and will unblock other changes we want to
make.

PR Close #32230
2020-02-25 13:12:27 -08:00
Greg Magolan 3887be464b test: disable broken saucelabs tests with “fixme-saucelabs-ivy” & “fixme-saucelabs-ve” tags (#35516)
PR Close #35516
2020-02-24 17:27:21 -08:00
Greg Magolan dde68ff954 build: add npm_integration_test && angular_integration_test (#33927)
* it's tricky to get out of the runfiles tree with `bazel test` as `BUILD_WORKSPACE_DIRECTORY` is not set but I employed a trick to read the `DO_NOT_BUILD_HERE` file that is one level up from `execroot` and that contains the workspace directory. This is experimental and if `bazel test //:test.debug` fails than `bazel run` is still guaranteed to work as  `BUILD_WORKSPACE_DIRECTORY` will be set in that context

* test //integration:bazel_test and //integration:bazel-schematics_test exclusively

* run "exclusive" and "manual" bazel-in-bazel integration tests in their own CI job as they take 8m+ to execute

```
//integration:bazel-schematics_test                                      PASSED in 317.2s
//integration:bazel_test                                                 PASSED in 167.8s
```

* Skip all integration tests that are now handled by angular_integration_test except the tests that are tracked for payload size; these are:
- cli-hello-world*
- hello_world__closure

* add & pin @babel deps as newer versions of babel break //packages/localize/src/tools/test:test

@babel/core dep had to be pinned to 7.6.4 or else //packages/localize/src/tools/test:test failed. Also //packages/localize uses @babel/generator, @babel/template, @babel/traverse & @babel/types so these deps were added to package.json as they were not being hoisted anymore from @babel/core transitive.

NB: integration/hello_world__systemjs_umd test must run with systemjs 0.20.0
NB: systemjs must be at 0.18.10 for legacy saucelabs job to pass
NB: With Bazel 2.0, the glob for the files to test `"integration/bazel/**"` is empty if integation/bazel is in .bazelignore. This glob worked under these conditions with 1.1.0. I did not bother testing with 1.2.x as not having integration/bazel in .bazelignore is correct.

PR Close #33927
2020-02-24 08:59:18 -08:00
Andrew Kushnir ae0253f34a fix(ivy): set namespace for host elements of dynamically created components (#35136)
Prior to this change, element namespace was not set for host elements of dynamically created components that resulted in incorrect rendering in a browser. This commit adds the logic to pick and set correct namespace for host element when component is created dynamically.

PR Close #35136
2020-02-07 17:22:53 -08:00
Zhicheng WANG c3e9cb2608 Merge remote-tracking branch 'en/master' into aio
# Conflicts:
#	aio/content/guide/angular-compiler-options.md
#	aio/content/guide/aot-metadata-errors.md
#	aio/content/guide/architecture-next-steps.md
#	aio/content/guide/architecture.md
#	aio/content/guide/browser-support.md
#	aio/content/guide/cli-builder.md
#	aio/content/guide/comparing-observables.md
#	aio/content/guide/dependency-injection-providers.md
#	aio/content/guide/deployment.md
#	aio/content/guide/deprecations.md
#	aio/content/guide/glossary.md
#	aio/content/guide/ivy.md
#	aio/content/guide/observables.md
#	aio/content/guide/router.md
#	aio/content/guide/static-query-migration.md
#	aio/content/guide/template-typecheck.md
#	aio/content/guide/transition-and-triggers.md
#	aio/content/guide/updating-to-version-9.md
#	aio/content/marketing/docs.md
#	aio/content/navigation.json
#	aio/content/tutorial/index.md
#	aio/content/tutorial/toh-pt1.md
#	aio/content/tutorial/toh-pt4.md
#	aio/package.json
#	aio/src/app/custom-elements/api/api-list.component.ts
#	aio/src/app/layout/footer/footer.component.html
#	aio/yarn.lock
#	packages/common/src/pipes/number_pipe.ts
#	packages/forms/src/directives/validators.ts
#	packages/forms/src/model.ts
2020-02-05 12:08:32 +08:00
George Kalpakas 669df70da5 fix(ivy): ensure `DebugNode`/`DebugElement` are tree-shakeable in Ivy (#35003)
There are different `DebugNode`/`DebugElement` implementations (and
associated helper functions) for ViewEngine and Ivy. Additionally, these
classes/functions, which are defined inside the `core` package, are
imported by the `platform-browser` package.

Previously, this code was not tree-shaken as expected in Ivy. #30130
partially addressed the issue, but only for the case where `core` and
`platform-browser` end up in the same closure after webpack's scope
hoisting. In cases where this is not the case, our webpack/terser based
tooling is not capable of tree-shaking it.

This commit fixes the problem, by ensuring that the code retained in Ivy
mode (due to the cross-package import) does not unnecessarily reference
`DebugNode`/`DebugElement`, allowing the code to be tree-shaken away.
This results in a 7.6KB reduction in the size of the main angular.io
bundle.

Jira issue: [FW-1802](https://angular-team.atlassian.net/browse/FW-1802)

PR Close #35003
2020-01-28 15:57:57 -08:00
George Kalpakas 9e351b8fe1 refactor: remove unused imports (#35003)
PR Close #35003
2020-01-28 15:57:57 -08:00
Zhicheng WANG 8663fa04a8 Merge remote-tracking branch 'en/master' into aio
# Conflicts:
#	.nvmrc
#	aio/content/cli/index.md
#	aio/content/guide/ajs-quick-reference.md
#	aio/content/guide/animations.md
#	aio/content/guide/aot-compiler.md
#	aio/content/guide/app-shell.md
#	aio/content/guide/architecture-components.md
#	aio/content/guide/architecture-modules.md
#	aio/content/guide/architecture-services.md
#	aio/content/guide/architecture.md
#	aio/content/guide/attribute-directives.md
#	aio/content/guide/bazel.md
#	aio/content/guide/bootstrapping.md
#	aio/content/guide/browser-support.md
#	aio/content/guide/build.md
#	aio/content/guide/cheatsheet.md
#	aio/content/guide/cli-builder.md
#	aio/content/guide/comparing-observables.md
#	aio/content/guide/complex-animation-sequences.md
#	aio/content/guide/component-interaction.md
#	aio/content/guide/component-styles.md
#	aio/content/guide/creating-libraries.md
#	aio/content/guide/dependency-injection-in-action.md
#	aio/content/guide/dependency-injection-navtree.md
#	aio/content/guide/dependency-injection-providers.md
#	aio/content/guide/dependency-injection.md
#	aio/content/guide/deployment.md
#	aio/content/guide/deprecations.md
#	aio/content/guide/displaying-data.md
#	aio/content/guide/dynamic-component-loader.md
#	aio/content/guide/dynamic-form.md
#	aio/content/guide/elements.md
#	aio/content/guide/entry-components.md
#	aio/content/guide/feature-modules.md
#	aio/content/guide/file-structure.md
#	aio/content/guide/form-validation.md
#	aio/content/guide/forms-overview.md
#	aio/content/guide/forms.md
#	aio/content/guide/frequent-ngmodules.md
#	aio/content/guide/glossary.md
#	aio/content/guide/hierarchical-dependency-injection.md
#	aio/content/guide/http.md
#	aio/content/guide/i18n.md
#	aio/content/guide/ivy.md
#	aio/content/guide/language-service.md
#	aio/content/guide/lazy-loading-ngmodules.md
#	aio/content/guide/lifecycle-hooks.md
#	aio/content/guide/module-types.md
#	aio/content/guide/ngmodule-api.md
#	aio/content/guide/ngmodule-faq.md
#	aio/content/guide/ngmodule-vs-jsmodule.md
#	aio/content/guide/ngmodules.md
#	aio/content/guide/npm-packages.md
#	aio/content/guide/observables-in-angular.md
#	aio/content/guide/observables.md
#	aio/content/guide/pipes.md
#	aio/content/guide/providers.md
#	aio/content/guide/reactive-forms.md
#	aio/content/guide/releases.md
#	aio/content/guide/reusable-animations.md
#	aio/content/guide/route-animations.md
#	aio/content/guide/router.md
#	aio/content/guide/rx-library.md
#	aio/content/guide/schematics-authoring.md
#	aio/content/guide/schematics-for-libraries.md
#	aio/content/guide/schematics.md
#	aio/content/guide/security.md
#	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-getting-started.md
#	aio/content/guide/service-worker-intro.md
#	aio/content/guide/set-document-title.md
#	aio/content/guide/setup-local.md
#	aio/content/guide/sharing-ngmodules.md
#	aio/content/guide/singleton-services.md
#	aio/content/guide/static-query-migration.md
#	aio/content/guide/structural-directives.md
#	aio/content/guide/styleguide.md
#	aio/content/guide/template-syntax.md
#	aio/content/guide/testing.md
#	aio/content/guide/transition-and-triggers.md
#	aio/content/guide/typescript-configuration.md
#	aio/content/guide/universal.md
#	aio/content/guide/updating.md
#	aio/content/guide/upgrade-setup.md
#	aio/content/guide/upgrade.md
#	aio/content/guide/user-input.md
#	aio/content/guide/using-libraries.md
#	aio/content/guide/visual-studio-2015.md
#	aio/content/guide/web-worker.md
#	aio/content/guide/workspace-config.md
#	aio/content/marketing/events.html
#	aio/content/marketing/resources.json
#	aio/content/navigation.json
#	aio/content/start/data.md
#	aio/content/start/deployment.md
#	aio/content/start/forms.md
#	aio/content/start/index.md
#	aio/content/start/routing.md
#	aio/content/tutorial/index.md
#	aio/content/tutorial/toh-pt0.md
#	aio/content/tutorial/toh-pt1.md
#	aio/content/tutorial/toh-pt2.md
#	aio/content/tutorial/toh-pt3.md
#	aio/content/tutorial/toh-pt4.md
#	aio/content/tutorial/toh-pt5.md
#	aio/content/tutorial/toh-pt6.md
#	aio/package.json
#	aio/src/app/app.component.spec.ts
#	aio/src/app/custom-elements/api/api-list.component.html
#	aio/src/app/layout/doc-viewer/doc-viewer.component.ts
#	aio/src/app/layout/mode-banner/mode-banner.component.ts
#	aio/src/app/layout/nav-item/nav-item.component.html
#	aio/src/app/shared/toc.service.ts
#	aio/src/styles/0-base/_typography.scss
#	aio/src/styles/2-modules/_api-pages.scss
#	aio/tools/transforms/templates/api/lib/memberHelpers.html
#	aio/yarn.lock
#	packages/common/http/src/headers.ts
#	packages/common/http/src/interceptor.ts
#	packages/common/http/src/params.ts
#	packages/common/http/src/response.ts
#	packages/common/src/common_module.ts
#	packages/common/src/directives/ng_for_of.ts
#	packages/common/src/location/location.ts
#	packages/common/src/pipes/date_pipe.ts
#	packages/core/src/change_detection/pipe_transform.ts
#	packages/core/src/di/injectable.ts
#	packages/core/src/metadata/di.ts
#	packages/core/src/metadata/directives.ts
#	packages/core/src/metadata/ng_module.ts
#	packages/core/src/render3/component_ref.ts
#	packages/forms/src/directives/reactive_directives/form_control_name.ts
#	packages/forms/src/form_builder.ts
#	packages/forms/src/model.ts
#	packages/forms/src/validators.ts
#	packages/router/src/config.ts
#	packages/router/src/directives/router_outlet.ts
#	packages/router/src/events.ts
#	packages/router/src/router.ts
#	packages/router/src/router_module.ts
#	packages/router/src/router_state.ts
#	packages/router/src/shared.ts
2020-01-24 15:55:22 +08:00