21173 Commits

Author SHA1 Message Date
Jessica Janiuk dfb072a93c release: cut the v12.0.4 release (#42531) 12.0.4 2021-06-09 11:03:28 -07:00
Andrew Scott 6203f5e3a7 docs: clarify onSameUrlNavigation behavior (#42275)
`onSameUrlNavigation` only affects whether the Angular Router
processes the URL and runs it through the navigation pipeline,
retriggering redirects, guards, and resolvers. The name `reload` is a
little confusing because it does _not_ reload the component. Developers
_also_ need to implement a custom `RouteReuseStrategy` to trigger a
component reload on same URL navigation.

Fixes #21115

PR Close #42275
2021-06-09 09:45:25 -07:00
David Shevitz 3abf365fdc docs: add guidance on adding filtering and sorting logic to componetns instead of pipes (#42368)
Fixes #41652

PR Close #42368
2021-06-08 17:53:31 -07:00
Teri Glover 5f6492e332 docs: Edited to remove jargon in Reference, Glossary, and Style sections (#42187)
PR Close #42187
2021-06-08 12:51:06 -07:00
kuncevic ef0ece14db docs: add Angular Rocks podcast (#42078)
PR Close #42078
2021-06-08 12:50:14 -07:00
Santosh Yadav 72b86c7c36 docs(platform-server): added commands for universal and add prerendering info (#36005)
Fixes #36004

PR Close #36005
2021-06-08 12:47:24 -07:00
Sam Severance f158ce1872 docs: Add selector for PeekABooDirective (#42146)
PR Close #42146
2021-06-08 12:46:06 -07:00
Teri Glover a42b9bf0ec docs: Edited to remove jargon in Reference Errors (#42186)
PR Close #42186
2021-06-08 12:45:24 -07:00
anups1 68ae32a864 docs: fix issue 24571 in ngOnChanges (#42517)
fix issue #24571 in ngOnChanges doc

PR Close #42517
2021-06-08 12:44:30 -07:00
Kapunahele Wong af5867d4b1 docs: improve accessibility of animations example (#41385)
PR Close #41385
2021-06-08 12:43:33 -07:00
Kapunahele Wong d509a76c2f docs: improve accessibility of reactive-forms example (#41252)
PR Close #41252
2021-06-08 12:42:20 -07:00
Kapunahele Wong 5746afe93d docs: improve accessibility of attribute-binding example (#41432)
PR Close #41432
2021-06-08 12:16:55 -07:00
Kapunahele Wong 6b8ecb448b docs: improve accessibility of pipes example (#41317)
PR Close #41317
2021-06-08 12:16:09 -07:00
Chris 93de5a0c5c docs: clarify documentation regarding passing multiple configurations to ng build (#41333)
Fixes #40923

PR Close #41333
2021-06-08 11:49:25 -07:00
Tiago Temporin 3ffdc751e4 docs: add components to material community components description (#41987)
PR Close #41987
2021-06-08 11:48:41 -07:00
Pete Bacon Darwin 8ad2feb0f3 refactor(docs-infra): prepare DocumentService to handle new disambiguated URLs (#42509)
A subsequent commit is going to change disambiguated URLs.
This commit prepares the AIO application to attempt the new URLs
if the old URLs fail. This will help to mitigate problems that may occur
during the period between deployment of the new version and the
service-worker not being updated.

PR Close #42509
2021-06-08 11:45:54 -07:00
Sam Severance a77ec5bcab fix(router): fix serializeQueryParams logic (#42481)
corrects a bug that resulted in query params such as
`[queryParams]={a: 1, b:[]}` being serialized as 'a=1&'
instead of 'a=1'

resolves #42445

PR Close #42481
2021-06-08 10:43:01 -07:00
Andrew Scott 64a0ed80a6 docs: add selector documentation for ViewChildren, ContentChildren, and ContentChild (#42366)
These notes are copied from `ViewChild`. In addition, `ContentChildren` and `ViewChildren`
can specify multiple string selectors by separating each selector by a
comma.

fixes #21734

PR Close #42366
2021-06-08 10:42:21 -07:00
MrJithil 92d8177904 docs: add links to examples for ComponentFactoryResolver (#42496)
Fixes #21705

PR Close #42496
2021-06-08 10:41:34 -07:00
Pete Bacon Darwin d5f9d4760b docs(core): describe interactions between view-encapsulated components (#42397)
This commit adds information to the view encapsulation guide that
describes the styling interactions between components that use differing
view encapsulation modes.

Closes #40715

PR Close #42397
2021-06-08 10:39:53 -07:00
MarsiBarsi 1c4da0908f docs: add Roman Sedov to contributors page (#42515)
PR Close #42515
2021-06-08 10:37:52 -07:00
iRealNirmal f217f01c30 docs: updated collaborators and add angular dev's link (#42516)
Existing trusted collaborators link is not working and now link is updated to one of angular.io page also it was missing angular dev's link so added it.

Closes #42513.

PR Close #42516
2021-06-08 10:37:17 -07:00
Teri Glover cba68e39c4 docs: Edits to remove jargon in Reference Observables, Dependency Injection (#42185)
PR Close #42185
2021-06-07 18:24:49 -07:00
Andrew Scott 34dd3c360b fix(language-service): fix autocomplete info display for some cases (#42472)
Before this commit, attribute completion display parts were retrieved
but not assigned. In addition, the switch case was non-exhaustive
because it did not include `StructuralDirectiveAttribute`.

PR Close #42472
2021-06-07 12:25:53 -07:00
George Kalpakas 8bb6fb7704 docs(router): fix code-example headers (#42507)
Previously, the code-examples headers used in the
"Creating custom route matches" tutorial contained the name of the
example directory (`routing-with-urlmatcher`). This was confusing,
because the user was previously instructed to create an app named
`angular-custom-route-match` and switch to that directory.

This commit fixes it by removing the root directory name from the
headers, thus leaving the path of the file relative to the current
working directory. This also aligns with code-examples in other guides.

PR Close #42507
2021-06-07 11:58:21 -07:00
Paul Gschwendtner 65d59305d5 build: remove unused no-strict tsconfig file (#42506)
In the past, when we enabled `--strict` in the repository, we added
another tsconfig for code not being migrated to be `--strict`
compatible. This was done for the deprecated http and webworker
packages. Since these are now removed, we can rmeove the logic.

PR Close #42506
2021-06-07 10:47:48 -07:00
JoostK dbefba5e3b docs: clarify how type-only imports can be used to avoid NG3003 (#42491)
Since #42453, type-only imports are not considered for cyclic imports.
This commit adds a note to the NG3003 error documentation to mention
using type-only imports to avoid the error.

PR Close #42491
2021-06-07 10:47:14 -07:00
Andrew Kushnir ba28a496fa docs: provide more info on the NO_ERRORS_SCHEMA schema (#42327)
The `NO_ERRORS_SCHEMA` schema can be used to ignore errors related to unknown elements or properties, but since it suppresses these errors it may also hide real problems in a template. This commit updates the `NO_ERRORS_SCHEMA` docs to mention that.

Closes #39454.

PR Close #42327
2021-06-07 10:46:35 -07:00
Pete Bacon Darwin f5d81d3c80 docs(core): clarify deprecation of entryComponents (#42248)
These may still be needed in View Engine libraries.

Closes #39958

PR Close #42248
2021-06-07 10:02:01 -07:00
Alex Inkin 770883ff4a fix(docs-infra): fix search results font color (#42488)
Use the same white constant for no results message
PR Close #42488
2021-06-07 09:38:06 -07:00
Gourav102 f7609c3285 docs: Corrected spelling (#42493)
Corrected spelling of 'Properties'.
PR Close #42493
2021-06-07 09:36:18 -07:00
Gourav102 5f1d72330e docs: Updated the code snippet path (#42494)
PR Close #42494
2021-06-07 09:32:57 -07:00
Igor Minar ad9dd2aaae docs: add node.js version info into the universal guide (#42375)
Previously we didn't document what versions were supported. Since universal requires node.js I'm adding version
information into the guide as a informative callout.

Fixes #39436

PR Close #42375
2021-06-04 15:21:22 -07:00
Joey Perrott 6080db1839 build: suppress errors in git hooks (#42484)
When errors occur in git hooks, we can safely supress them as they are validated on CI.

This is primarily coming up as an issue related to needing to reinstall node_modules

PR Close #42484
2021-06-04 13:34:02 -07:00
Teri Glover 68ea6d8d75 docs: Edits to remove jargon in Reference NgModules (#42182)
PR Close #42182
2021-06-04 13:32:56 -07:00
Joey Perrott beae4250fe ci: extend default timeout of karma tests for legacy saucelab tests (#42473)
After testing, it seems that the flakyness we are experiencing in our legacy
saucelabs job is caused by timeouts which happen due to the karma server being
unable to serve all of the files needed for the tests fast enough while concurrent
tests are being run.

PR Close #42473
2021-06-03 16:06:01 -07:00
Paul Gschwendtner a3b01e830e test(dev-infra): always use same virtual git client instance in publish tests (#42468)
With the recent refactorings to `GitClient`, where singletons
are created and can be retrieved through a static method, the
test has been updated to also install spies for the static methods
of `GitClient`. This commit updates the spy installation so that
the same mock git client is used that is also passed manually to
the release actions. Having two separate instances of the mock
git client could result in false-positive test results.

PR Close #42468
2021-06-03 14:34:33 -07:00
Paul Gschwendtner 0e058df00d refactor(dev-infra): improve type-safety of git client utility (#42468)
Currently the `GitClient` accepts a generic parameter for determining
whether the `githubToken` should be set or not. This worked fine so far
in terms of distinguishing between an authenticated and
non-authenticated git client instance, but if we intend to conditionally
show methods only for authenticated instances, the generic parameter
is not suitable.

This commit splits up the `GitClient` into two classes. One for
the base logic without any authorization, and a second class that
extends the base logic with authentication logic. i.e. the
`AuthenticatedGitClient`. This allows us to have specific methods only
for the authenticated instance. e.g.

  * `hasOauthScopes` has been moved to only exist for authenticated
    instances.
  * the GraphQL functionality within `gitClient.github` is not
    accessible for non-authenticated instances. GraphQL API requires
    authentication as per Github.

The initial motiviation for this was that we want to throw if
`hasOAuthScopes` is called without the Octokit instance having
a token configured. This should help avoiding issues as within
https://github.com/angular/angular/commit/3b434ed94d9ed067e5d999c064ae5f12b3cb175c
that prevented the caretaker process momentarily.

Additionally, the Git client has moved from `index.ts` to
`git-client.ts` for better discoverability in the codebase.

PR Close #42468
2021-06-03 14:34:33 -07:00
David Shevitz 3cb1c36b69 docs: update host and viewproviders section with correct logical tree representation (#42403)
Fixes #38741

PR Close #42403
2021-06-03 14:33:45 -07:00
George Kalpakas 1fbe4fe597 build(docs-infra): disable critical CSS inlining (#42435)
Previously, the critical CSS inlining optimization (which is turned on
by default in CLI v12+) was causing a Flash Of Unstyled Content (FOUC).
This was caused by the combination of the following facts:
- The way CSS inlining is implemented in the CLI makes loading the full
  styles asynchronous and non-render-blocking (so the app can bootstrap
  before the styles are fully downloaded).
- Angular.io does not employ the [app shell][1] pattern in order to
  render pages at build time, resulting in very minimal CSS rules being
  recognized as critical (for the purpose of inlining).

This commit fixes the FOUC by disabling the critical CSS inlining, while
we consider a better way to approach this (in order to be able to rip
the benefits of inlining without the FOUC).

[1]: https://angular.io/guide/app-shell

Fixes #42365

PR Close #42435
2021-06-03 14:32:07 -07:00
Paul Gschwendtner a6dec05e82 refactor(dev-infra): always use en-US locale for printing date in merge tool (#42470)
In the dev-infra merge tool, a test fails locally if it runs on
a system with a different system locale. We can either make the
test more flexible, or update the merge tool to always print the date
in `en-US` format. The latter is more reasonable given our console
messages being in english anyway.

PR Close #42470
2021-06-03 13:19:04 -07:00
cindygk 66d3770633 docs: offboard misko and annie from contributors page (#42467)
PR Close #42467
2021-06-03 13:17:45 -07:00
George Kalpakas ec3c0b43b6 test(docs-infra): fix URL for a11y testing of angular.io (#42471)
This commit fixes one of the URLs used for testing the accessibility of
angular.io from `start-routing` to `start/start-routing`. The old URL is
not correct and result in a "Page not found" error.

This commit also increases some of the a11y scores.

PR Close #42471
2021-06-03 13:16:50 -07:00
George Kalpakas 8f651f378f build: update dependency lighthouse to v8 (#42471)
Update LightHouse to v8.0.0 to take advantage of the latest fixes and
improvements.

PR Close #42471
2021-06-03 13:16:50 -07:00
iRealNirmal 50c87e86b6 fix(forms): the min and max validators should work correctly with 0 as a value (#42412)
Prior to this change the `min` and `max` validator directives would not
set the `min` and `max` attributes on the host element. The problem was
caused by the truthy check in host binding expression that was
calculated as `false` when `0` is used as a value. This commit updates
the logic to leverage nullish coalescing operator in these host binding
expressions, so `0` is treated as a valid value, thus the `min` and
`max` attributes are set correctly.

Partially closes #42267

PR Close #42412
2021-06-03 11:34:46 -07:00
JoostK 200cc31df4 fix(common): infer correct type when trackBy is used in ngFor (#41995)
When a `trackBy` function is used that accepts a supertype of the iterated
array's type, the loop variable would undesirably be inferred as the supertype
instead of the array's item type. This commit adds an inferred type parameter
to `TrackByFunction` to allow an extra degree of freedom, enabling the
loop value to be inferred as the most narrow type.

Fixes #40125

PR Close #41995
2021-06-03 11:33:27 -07:00
JoostK d69b91b97b test(compiler-cli): move TrackByFunction from fake_common to fake_core (#41995)
The `TrackByFunction` is declared in `@angular/core` so it should also be
included in `fake_core` instead of `fake_common`.

PR Close #41995
2021-06-03 11:33:27 -07:00
JoostK 4f7245ffde test(compiler-cli): load type declarations from fake_common (#41995)
The ngtsc test targets have fake declarations files for `@angular/core`
and `@angular/common` and the template type checking tests can leverage
the fake common declarations instead of declaring its own types.

PR Close #41995
2021-06-03 11:33:27 -07:00
JoostK b6d6a34eef fix(compiler-cli): exclude type-only imports from cycle analysis (#42453)
Type-only imports are known to be elided by TypeScript, so the compiler
can be certain that such imports do not contribute to potential import
cycles. As such, type-only imports are no longer considered during cycle
analysis.

Regular import statements that would eventually be fully elided by
TypeScript during emit if none of the imported symbols are used in a
value position continue to be included in the cycle analysis, as the
cycle analyzer is unaware of these elision opportunities. Only explicit
`import type` statements are excluded.

PR Close #42453
2021-06-03 11:31:59 -07:00
Vahid Mohammadi 0dad375de7 fix(common): initialize currencyCode in currencyPipe (#40505)
currencyCode should be initialized with the injected default currency code

PR Close #40505
2021-06-03 10:52:29 -07:00