21107 Commits

Author SHA1 Message Date
Andrew Kushnir 495a2138a0 release: cut the v12.0.3 release 12.0.3 2021-06-02 17:43:07 +00:00
David Pfeiffer e937f77cd4 docs: specify correct interceptor class type (#42437)
In the "Interceptor order" section of the HTTP guide there is a typo which incorrectly lists the same service twice when referring to two different services. The order that these services are listed is important, and this commit fixes the typo by listing the services in the correct order.
PR Close #42437
2021-06-01 16:36:59 -07:00
Andrew Scott 7abea4f7b0 docs: change Navigation from type to interface (#42281)
Navigation type should be interface so it can be documented on aio site.

fixes #37384

PR Close #42281
2021-06-01 14:13:22 -07:00
Alex Rickabaugh 8bdcca1e08 fix(compiler-cli): better detect classes that are indirectly exported (#42207)
The compiler flag `compileNonExportedClasses` allows the Angular compiler to
process classes which are not exported at the top level of a source file.
This is often used to allow for AOT compilation of test classes inside
`it()` test blocks, for example.

Previously, the compiler would identify exported classes by looking for an
`export` modifier on the class declaration itself. This works for the
trivial case, but fails for indirectly exported classes:

```typescript
// Component is declared unexported.
@Component({...})
class FooCmp {...}

// Indirect export of FooCmp
export {FooCmp};
```

This is not an immediate problem for most application builds, since the
default value for `compileNonExportedClasses` is `true` and therefore such
classes get compiled regardless.

However, in the Angular Language Service now, `compileNonExportedClasses` is
forcibly overridden to `false`. That's because the tsconfig used by the IDE
and Language Service is often far broader than the application build's
configuration, and pulls in test files that can contain unexported classes
not designed with AOT compilation in mind.

Therefore, the Language Service has trouble working with such structures.

In this commit, the `ReflectionHost` gains a new API for detecting whether a
class is exported. The implementation of this method now not only considers
the `export` modifier, but also scans the `ts.SourceFile` for indirect
exports like the example above. This ensures the above case will be
processed directly in the Language Service.

This new operation is cached using an expando symbol on the `ts.SourceFile`,
ensuring good performance even when scanning large source files with lots of
exports (e.g. a FESM file under `ngcc`).

Fixes #42184.

PR Close #42207
2021-06-01 12:16:47 -07:00
JoostK b0293c656e docs: clarify how declaration files can be installed (#42417)
The documentation suggested that `@types/*` scoped packages would
automatically be recognized, however the CLI configures a project such
that the package has to be explicitly added to the TypeScript
configuration files.

Closes #37572

PR Close #42417
2021-06-01 10:17:33 -07:00
Kristiyan Kostadinov f38b0b74f3 build: fix linting against jasmine focus functions (#42415)
We were linting against usages of `fdescribe` and `fit` by referencing the `no-jasmine-focus` rule which isn't installed, causing tslint to log the following:

```
Could not find implementations for the following rules specified in the configuration:
    no-jasmine-focus
Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed.
If TSLint was recently upgraded, you may have old rules configured which need to be cleaned
```

These changes switch to using the built-in `ban` rule.

PR Close #42415
2021-06-01 10:16:56 -07:00
George Kalpakas a31e55e5df docs(docs-infra): document the implementation of styles (incl. theming) in angular.io (#42396)
PR Close #42396
2021-06-01 10:16:22 -07:00
George Kalpakas c98b232431 fix(docs-infra): improve homepage layout in print mode (#42396)
In #41129, the `.hero-logo` image was changed from an `<img>` element to
a `<div>` with an image background. As a result, in print mode (where
browsers often omit backgrounds to save ink) the logo was not present.

This commit fixes this by ensuring the word `Angular` is displayed as a
title instead of the logo in print mode. It also hides the `Get started`
button in print mode, since it doesn't add any value.

Before: ![homepage-print before][1]
After: ![homepage-print after][2]

[1]: https://user-images.githubusercontent.com/8604205/120068867-889e6080-c08b-11eb-9bd5-233d8592f7ec.png
[2]: https://user-images.githubusercontent.com/8604205/120068869-89cf8d80-c08b-11eb-8740-a68a5ef68c34.png

PR Close #42396
2021-06-01 10:16:22 -07:00
George Kalpakas 9c798e27b3 refactor(docs-infra): remove unused _typography-theme.scss file (#42396)
This commit removes the `_typography-theme.scss` file that is currently
not used. The file contains a single Sass mixin
(`docs-site-typography-theme()`), which is never called.

PR Close #42396
2021-06-01 10:16:21 -07:00
George Kalpakas c7509538bb refactor(docs-infra): minor refactorings/style changes (#42396)
This commit includes some minor refactorings and style changes as a
follow-up to PR #41129. (The changes were minor enough that didn't
warrant blocking the PR.)

PR Close #42396
2021-06-01 10:16:21 -07:00
Joey Perrott c655810e65 refactor(dev-infra): update to later version of @octokit/rest and remove class extenstion of Octokit (#42395)
Update @octokit/rest and remove the usage of a class extension of Octokit as the
class does not have a class define constructor.

PR Close #42395
2021-06-01 10:14:48 -07:00
George Kalpakas 466d367d86 build: allow Node.js v15 and above for local development (#42387)
This commit changes the `engines` rules in the root `package.json` as
well as the `package.json` used when working on docs example to also
accept Node.js versions greater than v14. This aligns them with
`aio/package.json` and allows using Node.js v15 and v16 (current) for
local development in the `angular/angular` repo.

Related to #42367.

PR Close #42387
2021-06-01 10:14:08 -07:00
Dylan Hunn 89954fe1f8 docs(forms): make the forms validation guide specify more clearly what happens when mixing HTML5 native validators with Angular forms. (#42377)
Previously, the docs didn't say anything about the fact that the `novalidate` attribute is added to the enclosing form, or how to override that behavior. I have added a couple lines in the appropriate spot clarifying this issue.

PR Close #42377
2021-06-01 10:13:37 -07:00
Doug Parker 50188bb93b docs: update CLI builder to be platform agnostic (#42371)
Fixes #35373.

This changes the example from "run an arbitrary process" to "copy a file". This should make it a bit easier to follow, require less background knowledge to understand, and not use any platform-specific commands that won't work for Windows users.

The most glaring issue with this change is that this doc does not explictly specify how to build and run a builder. I've updated some of the files to hint at this a bit more (such as the `"implementation": "./dist/my-builder.js"`), but another pass is required to figure out the best way to compile a builder and how we want to structure this example to best communicate that.

PR Close #42371
2021-06-01 10:13:03 -07:00
Doug Parker dd8f4581da docs: minor cleanup (#42371)
Mainly just fixing some spacing and adding `.prototype` for non-static properties.

PR Close #42371
2021-06-01 10:13:03 -07:00
Andrew Scott bf931d3e84 docs: list supported values for read in decorator metadata (#42370)
fixes #20927

PR Close #42370
2021-06-01 10:12:24 -07:00
George Kalpakas 35ec0f9a88 build(docs-infra): fix linting warnings (#42359)
This commit fixes some linting warning that were printed when running
`ng lint`. The warnings can be seen in the `lint` step of
[this CI job][1].

Most of the warnings were related to the deprecation of passing context
to Jasmine matchers in favor of using the [withContext()][2] matcher
(introduced in Jasmine v3.3.0).

[1]: https://circleci.com/gh/angular/angular/995543
[2]: https://jasmine.github.io/api/3.3/matchers.html#withContext

PR Close #42359
2021-06-01 10:11:48 -07:00
Andrew Scott 702765bcc0 docs: add docs for DebugElement (#42352)
fixes #36048

PR Close #42352
2021-05-27 17:02:24 -07:00
Igor Minar 644ef7a785 docs: expand documentation for ROUTES (#42398)
Previously the docs were very minimalistic. The most important thing missing from the docs
was that people should primarily use higher level APIs instead of using ROUTES directly.

It would be nice to holistically overhaul more of the router API docs, but that's out of
scope of this change.

Fixes #39350

PR Close #42398
2021-05-27 16:47:39 -07:00
Teri Glover 2736465c61 docs: Edits to remove jargon in Reference section (#42033)
PR Close #42033
2021-05-27 16:47:06 -07:00
Teri Glover d0cd45be7d docs: edits to remove jargon (#42025)
PR Close #42025
2021-05-27 16:46:12 -07:00
Teri Glover 5de31d6c06 docs: Edited to remove jargon, fixed issue (#42026)
PR Close #42026
2021-05-27 15:37:15 -07:00
Teri Glover db9340be9f docs: Edits to remove jargon (#42026)
PR Close #42026
2021-05-27 15:37:14 -07:00
Teri Glover 46105afa83 docs: Edited to remove jargon. (#41978)
PR Close #41978
2021-05-27 15:36:38 -07:00
Andrew Scott b60c9c18f1 docs: clarify behavior of strict templates flags (#42392)
fixes #39355

PR Close #42392
2021-05-27 14:08:51 -07:00
Andrew Scott a2614898a5 docs: change markdown table to HTML table in template typecheck doc (#42392)
PR Close #42392
2021-05-27 14:08:50 -07:00
Joey Perrott eb6f6eb411 docs: clarify the shortcomings of local variable technique for parent-child component interactions (#42331)
Closes #38302

PR Close #42331
2021-05-27 14:04:44 -07:00
AleksanderBodurri a86a6b95c5 feat(docs-infra): implement dark mode (#41129)
defines styles for a first iteration of an aio darkmode

PR Close #41129
2021-05-27 11:24:55 -07:00
AleksanderBodurri 49efc4a829 feat(docs-infra): create module theme files (#41129)
creates theming files for the module styles in aio; done as part of the effor to make aio themeable

PR Close #41129
2021-05-27 11:24:55 -07:00
AleksanderBodurri df7e20c90c feat(docs-infra): create typography and layout theme files (#41129)
creates theming files for the aio typography styles; done as part of the effort to make aio themeable

PR Close #41129
2021-05-27 11:24:54 -07:00
AleksanderBodurri cfcb9037db refactor(docs-infra): grab scss mixins with scss use syntax instead of global imports (#41129)
move away from global mixins because @import is going to be deprecated

PR Close #41129
2021-05-27 11:24:54 -07:00
AleksanderBodurri 8496fb7c82 refactor(docs-infra): grab scss constants using scss use syntax instead of the global imports (#41129)
move away from using global constants in scss files because @import will be deprecated soon

PR Close #41129
2021-05-27 11:24:54 -07:00
AleksanderBodurri 91210d1947 refactor(docs-infra): rename namespaced scss to index files (#41129)
scss files were forwarded from files that were named without convention, changes these file names to follow conventions

PR Close #41129
2021-05-27 11:24:54 -07:00
AleksanderBodurri 29f805cf69 feat(docs-infra): port over material io theming logic to angular io (#41129)
brings in theming tools from material io into angular io in preparation of implementing darkmode

PR Close #41129
2021-05-27 11:24:54 -07:00
Igor Minar 6854adbde0 docs: add a note about <select> and nested <option>s in Ivy compat guide (#42338)
An internal change in Ivy has surfaced issues in previosly broken code. This change adds a note to the
Ivy compatibility guide as well as the TrackByFunction api docs.

Fixes #35896

PR Close #42338
2021-05-27 11:12:25 -07:00
George Kalpakas b57d460419 build(docs-infra): remove unused spy-directive.gif image (#42388)
The only reference to the `spy-directive.gif` image was removed
in #42369, so the image is no longer used. This commit removes the file
from the repository.

PR Close #42388
2021-05-27 08:58:00 -07:00
George Kalpakas 8b41322660 docs: fix typos in the cli-builder guide (#42386)
PR Close #42386
2021-05-27 08:57:20 -07:00
Sam Severance 515f001d5d docs: update links to Testing Component Scenarios page (#42385)
PR Close #42385
2021-05-27 08:56:06 -07:00
不肖・高橋 fe4f31c52e docs: fix a typo (#42384)
The 'B' in 'StackBlitz' is lowercased.
PR Close #42384
2021-05-27 08:55:28 -07:00
Wagner Maciel bd0d68fd58 docs: explain what a deploy url is and how it differs from a base href (#42363)
fixes #34931

PR Close #42363
2021-05-27 08:54:48 -07:00
Andrew Kushnir 3c07cccb31 docs: improve preloading component data chapter (#42340)
This commit updates the `Lazy-loading feature modules` guide (guide/lazy-loading-ngmodules) to fix example code that illustrates the process of preloading component data.

Closes #37113.

PR Close #42340
2021-05-27 08:54:03 -07:00
Andrew Scott 2513a533ed docs: add note to clarify that ngOnChanges is only called if inputs are bound (#42374)
fixes #23017

PR Close #42374
2021-05-26 17:17:26 -07:00
Igor Minar 6d20128460 docs: add a note about the ngc command and command line options (#42373)
It turns out that we don't document anywhere how ngc works and what options we support.
I added a brief section, without going too much into details because most users should not need to use ngc directly.

I also came across some bug in `ngc` and filed #42372.

Fixes #29623

PR Close #42373
2021-05-26 17:16:40 -07:00
David Shevitz 75a33e5fa9 docs: remove lightbox gif from Use Directives to Watch the DOM section. (#42369)
This gif is out of date and causing reader confusion.

Fixes #40193

PR Close #42369
2021-05-26 15:49:06 -07:00
Andrew Kushnir 075cbfca30 docs: use json pipe in Forms guide instead of a temporary diagnostic field (#42364)
Closes #37283.

PR Close #42364
2021-05-26 15:47:06 -07:00
Zach Arend 765854ed8f build: allow node v15 and above for aio (#42367)
Changes the engines rule in aio to accept any node version greater than
or equal to v14. This allows node v15 to work with aio.

addresses #42076

PR Close #42367
2021-05-26 14:24:18 -07:00
Andrew Kushnir 42b51275f4 docs: clarify when the ngDoBootstrap hook is invoked (#42362)
Closes #35242.

PR Close #42362
2021-05-26 14:23:46 -07:00
Andrew Scott 61cfde29f5 docs: clarify that forRoot can be called in other modules (#42361)
The faq on `forRoot` implies that you cannot and should not call `forRoot` for an import
outside the AppModule. This is technically incorrect. This commit clarifies
the statement and refers the reader to the hierarchical injectors guide.

fixes #29002

PR Close #42361
2021-05-26 14:23:09 -07:00
mgechev 4afd32c25f ci: update the github feature request process action and run on cron (#42337)
- Update to the latest hash
- Set the limit to 100 feature requests
- Run daily at 2pm

PR Close #42337
2021-05-26 14:22:37 -07:00
Andrew Scott 02c61e7cb1 docs: add note about why module import order is important (#42323)
Fixes #30223

PR Close #42323
2021-05-26 14:21:53 -07:00