20194 Commits

Author SHA1 Message Date
Enea Jahollari f434eadc0d docs: remove unnecessary <hr /> tags in Getting Started sections (#40693)
After the docs UI redesign `h2` tags got a border top.
`border-top: 1px solid #dbdbdb;`;
In the sections of Getting Started guide in order to separate
`What's next` from above content an `<hr />` tag was used,
that now becomes unnecessary.

This commit removes unnecessary `<hr />` tags.

PR Close #40693
2021-02-16 08:00:42 -08:00
Dan Levy 0b401cce51 docs: add camelCase example to style notation (#40699)
PR Close #40699
2021-02-16 07:59:41 -08:00
Pete Bacon Darwin 52144948fa build(docs-infra): add a link to usage notes from description (#40835)
The "Usage Notes" section is often at the bottom of a long page of content
which can make it difficult to discover. This commit adds a link at the
end of the "Description" if there is a "Usage Notes" section on the page.
This link should help the reader to discover that there is more information
available further down the page.

This is basically a marginal fix. The longer term fix should be to
consider what content goes in which sections and how they should
be laid out on the page.

See #40753

PR Close #40835
2021-02-16 07:47:09 -08:00
Kristiyan Kostadinov 84b01127a7 refactor(docs-infra): use CDK clipboard service (#40840)
The CDK has had a service for copying strings to the clipboard. These changes switch
AIO to it, rather than having to maintain a custom solution.

PR Close #40840
2021-02-16 07:43:56 -08:00
Alexey Elin 7b4a8c898e docs: fix schematics' package name for ng generate sub-commands (#40846)
PR Close #40846
2021-02-16 07:43:02 -08:00
Daniel 378bf62938 docs: capitalize Angular word in upgrade-setup.md file (#40862)
PR Close #40862
2021-02-16 07:42:35 -08:00
mgechev 91c68f498e docs: add a style recommendation for initializing inputs (#40698)
This practice is to better align with `strictPropertyInitialization`
which is coming by default with strict mode in v12.

PR Close #40698
2021-02-12 17:07:30 -08:00
Bjarki b5f20700c2 fix(core): address Trusted Types bug in Chrome 83 (#40815)
In Chrome 83 passing a TrustedScript to eval just returns the
TrustedScript back without evaluating it, causing the
newTrustedFunctionFor{Dev,JIT} functions to fail. This is a browser bug
that has been fixed in Chrome 84, and only affects Angular applications
running with JIT (which includes unit tests).

As a temporary workaround for users still on Chrome 83, detect when this
occurs in the newTrustedFunctionFor* functions and fall back to the
straightforward, non-Trusted Types compatible implementation. The only
combination that is left affected consists of Angular applications
running with JIT, that have explicitly configured Trusted Types in
enforcement mode, with users that are still on Chrome 83.

Also correct docstring for newTrustedFunctionForJIT.

PR Close #40815
2021-02-12 16:59:58 -08:00
mgechev 7e3815cdc9 docs: add ng-conf 2021 (#40783)
PR Close #40783
2021-02-12 16:49:22 -08:00
Nils Mehlhorn d3d02f8897 docs: add NgRx book to resources (#39841)
PR Close #39841
2021-02-12 16:48:57 -08:00
Jeremy Elbourn a2fba9e2a5 docs: clarify that support schedule is subject to change (#40770)
Initially raised due to #39509, this change updates our
"Support policy and schedule" with the same disclaimer
from the "Release frequency" section above.

PR Close #40770
2021-02-12 16:14:52 -08:00
Sam Hrncir aa5c42af7e docs: Clarify new ng workspace options (#40816)
Hope this helps make the tutorial go even smoother for people after me.

PR Close #40816
2021-02-12 16:13:31 -08:00
JiaLiPassion 76dfcfbf4b release: cut the zone.js-0.11.4 release (#40775)
PR Close #40775
2021-02-12 13:33:05 -08:00
Daniel 1516b5d391 docs: capitalize Angular word in zone.md file (#40813)
PR Close #40813
2021-02-12 12:01:55 -08:00
Sam Hrncir ebbcf0cc04 docs: Update start-deployment.md (#40817)
Updated section reference to current name listed in sidebar.
PR Close #40817
2021-02-12 09:30:03 -08:00
Pete Bacon Darwin 8225bb5b57 refactor(compiler-cli): implement ɵɵngDeclarePipe() (#40803)
This commit implements creating of `ɵɵngDeclarePipe()` calls in partial
compilation, and processing of those calls in the linker and JIT compiler.

See #40677

PR Close #40803
2021-02-12 09:00:16 -08:00
Sam Hrncir f41637c459 docs: typo fix (#40804)
PR Close #40804
2021-02-12 08:59:47 -08:00
Sam Hrncir 9482a4df4c docs: copy paste error (#40812)
The removed bit was copied and pasted from a previous section.  Not relevent for the particular step of the tutorial.
The removed bit can we found as intended in __Adding Navigation__ section.
PR Close #40812
2021-02-11 15:59:55 -08:00
Alex Rickabaugh 87ac05290a fix(compiler-cli): set TS original node on imported namespace identifiers (#40711)
This commit causes imports added by ngtsc's `ImportManager` to have their
TypeScript "original node" set to the generated `ts.ImportDeclaration`
statement.

In g3, the tsickle transformer runs after the Angular transformer and post-
processes Angular's compilation output. One of its post-processing tasks is
to transform generated imports and references to imported symbols from the
commonjs module system to the g3 module system. Part of this transformation
involves recognizing modules with specific metadata and altering references
to symbols from those modules accordingly.

Normally, tsickle can rely on TypeScript's binding for an imported symbol to
find its origin module and thus the correct metadata for the symbol. However
the Angular transform generates new synthetic imports which don't have such
binding information. Angular's imports are always namespace imports of the
form:

```
import * as qualifier 'module/specifier';
```

References to such an import are then of the form `qualifier.SymbolName`.

To process such imports properly, tsickle needs to be able to associate the
reference to `qualifier` in the expression `qualifer.SymbolName` with the
`ts.ImportDeclaration` statement that defines it. It expects to do this by
looking at the `ts.getOriginalNode()` for the `qualifier` reference, which
should be the `ts.ImportDeclaration`. This commit changes ngtsc's import
generation mechanism to set the original node on `qualifier` identifiers
according to this expectation.

This commit is not tested in the direct compiler tests, since:

1) there is no observable behavior externally from setting the original node
2) we don't have tests that intercept transformer operations (which could be
   used to directly assert against the AST nodes)
3) tsickle's published version does not (yet) contain the g3-specific
   transformations which rely on the original node and would thus allow the
   behavior to be observed.

Instead, we rely on the g3 testing suite to validate the correctness of this
fix. Breaking this functionality would cause g3 compilation errors for
targets, since tsickle would be unable to transform imports correctly.

PR Close #40711
2021-02-11 15:58:25 -08:00
Joey Perrott 4c6d557ca9 build: update browserstacktunnel-wrapper (#40810)
Update browserstacktunnel-wrapper to address security vulnerabilities

PR Close #40810
2021-02-11 13:11:15 -08:00
Joey Perrott 75fb76c63b build: update cldr-data-downloader (#40810)
Update cldr-data-downloader to address security vulnerabilities.

PR Close #40810
2021-02-11 13:11:15 -08:00
Joey Perrott ac645ec951 build: update gulp and gulp-conventional-changelog (#40810)
Update gulp and gulp-conventional-changelog to address security vulnerabilities.

PR Close #40810
2021-02-11 13:11:15 -08:00
Joey Perrott 925e2b7434 build: remove jpm dependency (#40807)
Remove our dependency on jpm as it goes unused in our repository.

PR Close #40807
2021-02-11 12:30:55 -08:00
Joey Perrott b42497144d ci: remove BES usages from CI (#40809)
Removes BES configuration from CI bazel configuration as it is increasingly seeing timeouts
causing failures, but the uploaded results go largely unlooked at.

PR Close #40809
2021-02-11 12:28:55 -08:00
Joey Perrott 0227ca83ae Revert "fix(router): fix load interaction of navigation and preload strategies (#40389)" (#40806)
This reverts commit e9a19a6152.

PR Close #40806
2021-02-11 11:59:10 -08:00
GChuf 85a5336efb build: Update dependencies (#40726)
Updates some dependencies.

PR Close #40726
2021-02-11 11:17:21 -08:00
Paul Gammans bba1981c6e fix(router): fix load interaction of navigation and preload strategies (#40389)
Fix router to ensure that a route module is only loaded once especially
in relation to the use of preload strategies with delayed or partial
loading.

Add test to check the interaction of PreloadingStrategy and normal
router navigation under differing scenarios.
Checking:
 * Prevention of duplicate loading of modules.
   related to #26557
 * Prevention of duplicate RouteConfigLoad(Start|End) events
   related to #22842
 * Ensuring preload strategy remains active for submodules if needed
   The selected preload strategy should still decide when to load submodules
 * Possibility of memory leak with unfinished preload subscription
   related to #26557
 * Ensure that the stored loader promise is cleared so that subsequent
   load will try the fetch again.
 * Add error handle error from loadChildren
 * Ensure we handle error from with NgModule create

Fixes #26557 #22842 #26557

PR Close #40389
2021-02-11 09:15:09 -08:00
arturovt a2a5b4add5 fix(http): complete the request on timeout (#40771)
When using the [timeout attribute](https://xhr.spec.whatwg.org/#the-timeout-attribute) and an XHR
request times out, browsers trigger the `timeout` event (and execute the XHR's `ontimeout`
callback). Additionally, Safari 9 handles timed-out requests in the same way, even if no `timeout`
has been explicitly set on the XHR.

In the above cases, `HttpClient` would fail to capture the XHR's completing (with an error), so
the corresponding `Observable` would never complete.

PR Close #40771
2021-02-11 09:13:40 -08:00
Joey Perrott ce80d5ee19 fix(dev-infra): update npm package subsitutions to reflect no longer having an imported workspace (#40785)
Update replacements of the `//dev-infra/` piece of bazel path segments to reference the `@npm//`
workspace rather than creating its own workspace.

PR Close #40785
2021-02-11 09:13:00 -08:00
Joey Perrott 6ee5cdce9d ci: Remove language-service from testing group (#40795)
Much like the compiler-cli, the language-service package has internal testing
tools that are not intended for external use and do not need fw-testing review.
See #40679.

PR Close #40795
2021-02-11 09:03:23 -08:00
waterplea cadee6d63f docs(core): add missing dot at the end of the sentence (#40800)
PR Close #40800
2021-02-11 09:00:51 -08:00
waterplea 006a523815 docs(core): fix typo in interpolation property description (#40800)
PR Close #40800
2021-02-11 09:00:51 -08:00
Joey Perrott 9cbd9bed55 Revert "ci: Remove language-service from testing group (#40787)" (#40794)
This reverts commit 06671e85f9.

PR Close #40794
2021-02-10 16:06:21 -08:00
Nicholas Papadopoulos 636b6b4f94 docs: fix typo in workspace config docs (#40784)
PR Close #40784
2021-02-10 16:01:12 -08:00
Andrew Scott c23d029473 ci: Remove language-service from testing group (#40787)
Much like the compiler-cli, the language-service package has internal testing
tools that are not intended for external use and do not need fw-testing review.
See #40679.

PR Close #40787
2021-02-10 16:00:32 -08:00
Alex Rickabaugh e3f09ce845 release: cut the v11.2.0 release (#40790)
PR Close #40790
11.2.0
2021-02-10 14:08:21 -08:00
Amit Gharat cfbb1faa6f docs: add Angular + NgRx book by the asian BPB Publications (#39680)
PR Close #39680
2021-02-10 11:14:35 -08:00
Alexey Elin e2bb954a7a docs: fix absent documentation for digitsInfo parameter in the API docs (#40746)
PR Close #40746
2021-02-10 11:09:10 -08:00
Alexey Elin 5795c980b5 docs: add link to component-less routes description. (#40741)
Currently it's not clear what a component-less route is. Add a link to  make it clear

PR Close #40741
2021-02-10 11:08:40 -08:00
JoostK e99c4e230f fix(compiler): include parenthesis in expression source spans (#40740)
The parser does not include parenthesis in the AST, so if a LHS
expression would be parenthesized then its start span would start
after the opening parenthesis. Previously, some parent AST nodes would
be created with the start span of its LHS as its own start, so this
resulted in the parent AST node not encompassing the opening parenthesis
in its source span. This commit fixes the issue by capturing the start
index prior to parsing a child AST tree, which is then used as the
start of the source span of the the parent AST node that is parsed.

Fixes #40721

PR Close #40740
2021-02-10 11:07:12 -08:00
JoostK d36890c854 refactor(compiler-cli): remove event output helper from TCB (#40738)
In 5c547675b1 the `EventEmitter.subscribe`
API was extended with a new signature that allows the emitter's generic
type `T` to flow into the subscribe callback. This new signature removes
the need for the special `_outputHelper` function that used to be
emitted into TCBs when `strictOutputEventTypes`/`strictTemplates` is
enabled.

PR Close #40738
2021-02-10 11:06:36 -08:00
Mickael Istria 5adb47ff35 docs(language-service): Add note about Eclipse IDE support of Angular LS (#40551)
Mention Eclipse Wild Web Developer that ships with Angular language
service.

PR Close #40551
2021-02-10 11:05:53 -08:00
Kristiyan Kostadinov 7e0ff8cbb6 fix(compiler): throw error for duplicate template references (#40538)
Adds an error if a reference is used more than once on the same element (e.g. `<div #a #a>`).
We used to have this error in ViewEngine, but it wasn't ported over to Ivy.

Fixes #40536.

PR Close #40538
2021-02-10 11:05:16 -08:00
abarghoud bf85f04baf fix(common): date is not correctly formatted when year is between 0 and 99 (#40448)
use setFullYear method when parsing date to avoid javascript date factory behaviour

Fixes #40377

PR Close #40448
2021-02-10 11:04:38 -08:00
Kanstantsin Kamkou fffefd12e5 docs: clarify observables recommendation (#39237)
Observables are not the only async mechanism that Angular employs.
This change respects that application developers are not required to
use Observables in their own application architecture.

Closes #39155

PR Close #39237
2021-02-10 11:04:05 -08:00
stsogoo 9ae21ee118 fix(core): properly move embedded views of dynamic component's projectable nodes (#37167)
This commit fixes the issue of the ASSERTION ERROR issue when
a projected node(RNode) inside an array is checked against the types
of TNodeType.Element, TNodeType.Container, TNodeType.ElementContainer,
TNodeType.IcuContainer, TNodeType.Projection. As it's inside an array,
it doesn't fall into any of those types, as a result, it throws
the ASSERTION ERROR.

PR Close #37120

PR Close #37167
2021-02-10 11:03:06 -08:00
Zach Arend 95446fb15c fix(compiler-cli): don't crash when we can't resolve a resource (#40660)
Produces a diagnostic when we cannot resolve a component's external style sheet or external template.

The previous behavior was to throw an exception, which crashed the
Language Service.

fixes angular/vscode-ng-language-service#1079

PR Close #40660
2021-02-10 10:48:34 -08:00
ayazhafiz ba6d8d44b1 refactor(language-service): pull out interfaces on package toplevel (#40773)
This is patch PR for #40621.

Two motivations behind this change:

1. We would like to expose the types of the Language Service to external
   users (like the VSCode extension) via the npm package, on the top
   level of the package
2. We would like the View Engine and Ivy LS to share a common interface
   (notably after the inclusion of `getTcb`, the Ivy LS upholds a
   strict superset of `ts.LanguageService`; previously both VE and Ivy
   LS were aligned on `ts.LanguageService`.)

To this end, this commit refactors the exports on the toplevel of the
`language-service/` package to just be types common to both the VE and
Ivy language services. The VE and Ivy build targets then import and use
these types accordingly, and the expectation is that an external user
will just import the relevant typings from the toplevel package without
diving into either the VE or Ivy sources.

Follow up on #40607

PR Close #40773
2021-02-10 10:37:58 -08:00
Valerij Dobler 3b0c51e045 docs: edit example to fetch hero before sending message (#40419)
PR Close #40419
2021-02-09 14:46:18 -08:00
Kapunahele Wong 80c21bf6b0 docs: add redirect from updating-v10 to v11 (#40108)
Redirects from https://angular.io/guide/updating-to-version-10 to
https://angular.io/guide/updating-to-version-11 to avoid 404 errors.

PR Close #40108
2021-02-09 14:45:39 -08:00