338 Commits

Author SHA1 Message Date
Kristiyan Kostadinov 86843f8916 refactor(animations): remove unnecessary code (#44378)
* The `TransitionAnimationEngine` had a fallback where it would store classes directly on a node if it doesn't have a `classList`. Presumably this is to support old browsers or if an animation is set on something like `ng-container`. This information was never used for anything since `containsClass` was never called. These changes simplify the logic to just a null check.
* Deprecates the `AnimationDriver.matchesElement` method, because it was only used in one place which can be replaced with `classList.contains`. We can't remove the method completely, because `AnimationDriver` is a public API. We also can't turn it into a method on the base class in order to remove it from the sub-classes, because it can break apps using `noImplicitOverride` while extending `AnimationDriver`.

PR Close #44378
2021-12-08 13:23:41 -05:00
JoostK ad5b1d5883 refactor(compiler-cli): dismantle View Engine implementation of ngc (#44269) (#44387)
This commit does a first-pass removal of the View Engine infrastructure
in compiler-cli. A more in-depth cleanup is necessary and large parts
of the View Engine compiler infrastructure remain within
`@angular/compiler`, this is just a first cleanup step.

PR Close #44269

PR Close #44387
2021-12-06 16:05:26 -05:00
George Kalpakas a8f96e8aaa build(docs-infra): update .browserslistrc to align with new CLI apps (#44352)
Update `.browserslistrc` to align with new CLI apps. This drops some
older browsers that are no longer supported by Angular v13+.
See the [list of supported browsers][1].

[1]: https://angular.io/guide/browser-support

PR Close #44352
2021-12-02 11:53:03 -08:00
JoostK 7fb4309cca perf(common): code size reduction of ngFor directive (#44315)
This commit makes several changes to the implementation of `NgForOf` to
reduce its code size in production builds:

1. The tailor-made message for an unsupported differ is fully
   tree-shaken in production builds, in favor of the exception from the
   differ factory itself.
2. The private `_perViewChange` method was changed into a free-standing
   function, to allow its name to be minimized.
3. The need for an intermediate `RecordViewTuple` was avoided by
   applying the operation in-place, instead of collecting all insertions
   into a buffer first. This is safe as the `_perViewChange` operation
   that used to be done on each `RecordViewTuple` is entirely local to
   the tuple itself. Hence, it is invariant to execution ordering which
   means that the `_perViewChange` can be executed directly during the
   `forEachOperation` loop.

PR Close #44315
2021-12-02 09:25:45 -08:00
Ramesh Thiruchelvam 277390e0ca refactor(core): make the error messages tree shakable (#44219)
Long error messages can be tree-shaken in the production build.
Doing this, we will keep the throw and remove the long error messages.

See: https://github.com/angular/angular/pull/44210#pullrequestreview-810615849

PR Close #44219
2021-11-30 14:17:39 -05:00
Alex Rickabaugh 84ef01d9d2 refactor: delete the View Engine runtime (#44218)
This commit removes the View Engine runtime. Itself, this change is
relatively straightforward, but it represents the final step in a multi-year
journey. It's only possible due to the hard work of many current and former
team members and collaborators, who are too numerous to list here.

Co-authored-by: Alan Agius <alan.agius4@gmail.com>
Co-authored-by: Andrew Kushnir <akushnir@google.com>
Co-authored-by: Andrew Scott <atscott01@gmail.com>
Co-authored-by: Andrew Seguin <andrewjs@google.com>
Co-authored-by: Cédric Exbrayat <cedric@ninja-squad.com>
Co-authored-by: Charles Lyding <19598772+clydin@users.noreply.github.com>
Co-authored-by: Dave Shevitz <dshevitz@google.com>
Co-authored-by: Doug Parker <dgp1130@users.noreply.github.com>
Co-authored-by: Dylan Hunn <dylhunn@gmail.com>
Co-authored-by: Emma Twersky <emmatwersky@google.com>
Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>
Co-authored-by: Igor Minar <iminar@google.com>
Co-authored-by: Jeremy Elbourn <jelbourn@google.com>
Co-authored-by: Jessica Janiuk <jessicajaniuk@google.com>
Co-authored-by: JiaLiPassion <JiaLi.Passion@gmail.com>
Co-authored-by: Joey Perrott <josephperrott@gmail.com>
Co-authored-by: Joost Koehoorn <joost.koehoorn@gmail.com>
Co-authored-by: Kristiyan Kostadinov <crisbeto@abv.bg>
Co-authored-by: Madleina Scheidegger <mscheid@google.com>
Co-authored-by: Mark Thompson <2554588+MarkTechson@users.noreply.github.com>
Co-authored-by: Minko Gechev <mgechev@gmail.com>
Co-authored-by: Paul Gschwendtner <paulgschwendtner@gmail.com>
Co-authored-by: Pawel Kozlowski <pkozlowski.opensource@gmail.com>
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Co-authored-by: Wagner Maciel <wagnermaciel@google.com>
Co-authored-by: Zach Arend <zachzach@google.com>

PR Close #44218
2021-11-24 00:04:24 +00:00
Andrew Kushnir 96fedd249e fix(forms): make the FormControlStatus available as a public API (#44183)
This commit makes the `FormControlStatus` symbol available as a public API. The symbol itself
was intended to become a part of the public API, but due to the missing re-export, the symbol
remains private.

Fixes #44176.

PR Close #44183
2021-11-17 10:37:28 -08:00
Andrew Kushnir 150a0b71e8 refactor(forms): inherit ngOnChanges hooks from the base class (#43945)
This commit updates the code of the min/max and minlength/maxlength validator directives to inherit `ngOnChanges` hooks from the base class (the `AbstractValidatorDirective` one), rather than implementing the hooks on the child classes. This was needed to avoid issues with hooks inheritance in ViewEngine, but since it's deprecated, the code can be cleaned up.

PR Close #43945
2021-11-17 10:36:40 -08:00
Marc Redemske 516570c29c docs: remove redudant word in goldens/README.md (#44192)
PR Close #44192
2021-11-17 10:34:09 -08:00
Andrew Scott 789c1d43ed refactor(language-service): Remove View Engine code from language service package (#44064)
This commit removes ViewEngine-specific code from the langauge service
package. This code is no longer used since VE is not supported in v13+.

PR Close #44064
2021-11-10 01:20:05 +00:00
Paul Gschwendtner 06b2023e13 test: update size goldens for AIO after updating to final v13 RCs (#44030)
Updates the size goldens for AIO to reflect the new measurements
after the v13 update to the latest release-candidates. i.e.

* rc.3 of Angular framework
* rc.2 of Angular CDK/Material
* rc.3 of Angular CLI.

Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>

PR Close #44030
2021-11-08 16:59:47 +00:00
iRealNirmal 210f7e5d2c refactor(forms): update minlength/maxlength to inherit abstractValidator (#43998)
Modified minlength and maxlength validator to inherit abstractValidator

For every validator type different PR will be raised as discussed in #42378.

Closes #42267

PR Close #43998
2021-11-05 20:09:53 +00:00
Joey Perrott 9741473f04 ci: update aio payloads size (#44046)
Update the payloads size for aio tracking.

PR Close #44046
2021-11-03 16:37:11 -07:00
Jessica Janiuk 8d89b2853c Revert "refactor(forms): update minlength/maxlength to inherit abstractValidator" (#43971)
This reverts commit 7b31b887f9.

PR Close #43971
2021-10-27 21:42:26 +00:00
iRealNirmal c44d1cbd58 refactor(forms): update minlength/maxlength to inherit abstractValidator (#43835)
Modified minlength and maxlength validator to inherit abstractValidator

For every validator type different PR will be raised as discussed in #42378.

Closes #42267

PR Close #43835
2021-10-26 20:24:40 +00:00
krzysztof-grzybek adc68b100b fix(router): reuse route strategy fix (#43791)
Currently, it's impossible to cache (detach/attach) parent route without caching child routes.
This produces a bug, when navigating from a/b to c, then to a/d, where a route is cached.
On the last navigation, we incorrectly restore a/b route instead of a/d.
This change introduces new behavior: if the route should be detached/attached,
we do so, but we check also child routes recursively.

Fixes #17333

PR Close #43791
2021-10-21 16:28:03 +00:00
Andrew Scott 772e08d14e fix(router): fix Router's public API for canceledNavigationResolution (#43842)
The commit which made the `canceledNavigationResolution` property on the `Router`
public did not add the corresponding configuration in the `ExtraOptions`.
https://github.com/angular/angular/commit/3c6b653089837459809a370ebcaf8911c3bab9ed
This was a mistake and is being corrected in this commit. We should not
encourage changing the properties post-setup (i.e.
`inject(Router).canceledNavigationResolution = 'computed'`). This manner
of configuration makes the options non-tree shakeable because we have to
keep both implementations in case the value changes at runtime.

PR Close #43842
2021-10-15 11:35:02 -07:00
Andrew Scott 68cdcd3259 Revert "refactor(router): clean up internal hooks (#43804)" (#43845)
This reverts commit 5cc51880db.

PR Close #43845
2021-10-14 14:43:41 -07:00
Andrew Scott 5f6e568dd6 refactor(router): clean up internal hooks (#43804)
* beforePreactivation hook is unused
* The only place that uses afterPreactivation does not use the arguments

Not to say we won't want to provide hooks similar to this in the future,
but the current state is over-engineered for what it's being used for.

PR Close #43804
2021-10-14 10:04:01 -07:00
dario-piotrowicz 663690fc86 fix(docs-infra): improve cancel icon in top-menu search (#43600)
webkit browsers show a cancel X icon in the input search on focus/hover
which allows to clear the content of the input, such icon has small
glitches/imperfections so use a mat-icon instead

(this also adds such icon to non-webkit browsers)

PR Close #43600
2021-10-12 17:50:30 +00:00
Alan Agius 747553dd68 docs: deprecate ViewEngine-based renderModuleFactory (#43757)
DEPRECATED:

The `renderModuleFactory` symbol in `@angular/platform-server` is no longer necessary as of Angular v13.

The `renderModuleFactory` calls can be replaced with `renderModule`.

PR Close #43757
2021-10-07 16:47:54 -07:00
Kristiyan Kostadinov adf4481211 feat(common): add injection token for default date pipe timezone (#43611)
Adds a new injection token called `DATE_PIPE_DEFAULT_TIMEZONE` that allows for the default timezone for all `DatePipe` instances to be specified.

Fixes #43031.

PR Close #43611
2021-10-06 13:53:09 -07:00
George Kalpakas 3d26a07ff3 build(docs-infra): update Angular Material to version 13.0.0-next.7 (#43686)
This commit updates angular.io to the latest prerelease version of
Angular CDK/Material (v13.0.0-next.7).

PR Close #43686
2021-10-06 10:05:54 -07:00
George Kalpakas b8ab5ff0fb build(docs-infra): update AIO to align with new v13.0.0-next.9 CLI apps (#43686)
This commit updates angular.io to more closely align with new apps
created with the latest Angular CLI and remove redundant files/config
now that CLI has dropped support for differential loading.

PR Close #43686
2021-10-06 10:05:54 -07:00
George Kalpakas 81d3919102 refactor(docs-infra): prefix error messages with Angular version info (#43686)
Prefix error messages with the Angular version currently used in the
angular.io app. This applies to both errors logged to the console and
reported to Google Analytics and makes debugging certain errors easier.

PR Close #43686
2021-10-06 10:05:54 -07:00
Andrew Kushnir e3d6e97050 docs: deprecate ViewEngine-based JIT Compiler symbols (#43710)
DEPRECATION:

In ViewEngine, [JIT compilation](https://angular.io/guide/glossary#jit) required special providers (like `Compiler`, `CompilerFactory`, etc) to be injected in the app and corresponding methods to be invoked. With Ivy, JIT compilation takes place implicitly if the Component, NgModule, etc have not already been [AOT compiled](https://angular.io/guide/glossary#aot). Those special providers were made available in Ivy for backwards-compatibility with ViewEngine to make the transition to Ivy smoother. Since ViewEngine is deprecated and will soon be removed, those symbols are now deprecated as well:

- `ModuleWithComponentFactories`
- `Compiler`
- `CompilerFactory`
- `JitCompilerFactory`
- `NgModuleFactory`

Important note: this deprecation doesn't affect JIT mode in Ivy (JIT remains available with Ivy).

PR Close #43710
2021-10-05 18:51:55 -07:00
Kristiyan Kostadinov c14085e434 feat(core): drop support for TypeScript 4.2 and 4.3 (#43642)
Bumps the minimum required TypeScript version to 4.4.2 and removes the integration tests for 4.1, 4.2 and 4.3.

BREAKING CHANGE:
TypeScript versions older than 4.4.2 are no longer supported.

PR Close #43642
2021-10-05 17:26:37 -07:00
Maximilian Köller 0dc45446fe feat(service-worker): expose more version update events (#43668)
This commit introduces a new `SwUpdate#versionUpdates` observalbe, which provides more granular
information about Service Worker version updates than the already existing `SwUpdate#available`
observable.

The new events emitted by `SwUpdate#versionUpdates` basically add the possibility for application to
get notified if a new version is available on the server (not yet downloaded) and if an installation
of a new version failed.

Closes #39840

DEPRECATED: The `SwUpdate#availalbe` observable is deprecated.

The new `SwUpdate#versionUpdates` observable provides the same information and more. Therefore, it
is possible to rebuild the same behavior as `SwUpdate#availalbe` using the events emitted by
`SwUpdate#versionUpdates` and filtering for `VersionReadyEvent` events.
As a result, the `SwUpdate#availalbe` observable is now redundant.

PR Close #43668
2021-10-05 11:00:07 -07:00
Maximilian Köller 59225f5586 feat(service-worker): SwUpdate#activeUpdate and SwUpdate#checkForUpdate should have a meaningful outcome (#43668)
Previously `activateUpdate` and `checkForUpdate` returned `Promise<void>`, which did not provide any
information of the actual outcome of the operation. Developers needed to subscribe to a
corresponding observable to obtain the outcome.

With this commit `SwUpdate#activateUpdate` will return `Promise<boolean>` which resolves to `true` if
an update was activated, to `false` if no new version is available and rejects in case of any error.
`SwUpdate#checkForUpdate` also returns a `Promise<boolean>` which resolves to `true` if an update is available, to `false` if no update was found and rejects in case of any error.

Closes #39840

BREAKING CHANGE: The return type of `SwUpdate#activateUpdate` and `SwUpdate#checkForUpdate` changed to `Promise<boolean>`.

Although unlikely, it is possible that this change will cause TypeScript type-checking to fail in
some cases. If necessary, update your types to account for the new
return type.

DEPRECATED: The `SwUpdate#activated` observable is deprecated.

The `SwUpdate#activated` observable only emits values as a direct response to calling
`SwUpdate#activateUpdate()` and was only useful for determining whether the call resulted in an
update or not. Now, the return value of `SwUpdate#activateUpdate()` can be used to determine the
outcome of the operation and therefore using `SwUpdate#activated` does not offer any benefit.

PR Close #43668
2021-10-05 11:00:07 -07:00
Alan Agius e7b647fc06 refactor(dev-infra): remove dependency on minimist (#43644)
Refactor scripts to use `yargs`. The main motivation for this is to align and use a single parser.

PR Close #43644
2021-10-04 17:31:03 -07:00
Andrew Kushnir a3960846da feat(core): add createNgModuleRef function to create NgModuleRef based on NgModule class (#43580)
NgModule factories are obsolete with Ivy and most of the operations can already be performed with NgModule classes without retreieving corresponding factories. NgModule factories were useful to generate an `NgModuleRef` (via `NgModuleFactory.create` method). This commit adds a new function to create an instance of the `NgModuleRef` class without having the need to create a factory first.

PR Close #43580
2021-10-04 16:35:27 -07:00
Andrew Kushnir fe1f6421d2 feat(core): add getNgModuleById function to retrieve loaded NgModules by id (#43580)
This commit adds a new function called `getNgModuleById` to the public API surface of the framework. The `getNgModuleById` function allows to retrieve loaded NgModule class by id (specified via `@NgModule.id`). The function is a replacement for the `getModuleFactory` function.

DEPRECATION:

The `getModuleFactory` function is deprecated in favor of the `getNgModuleById` one. With Ivy it's possible to work with NgModule classes directly, without retrieving corresponding factories, so the `getNgModuleById` should be used instead.

PR Close #43580
2021-10-04 16:35:26 -07:00
JoostK cc96f322df refactor(compiler-cli): deprecate the fullTemplateTypeCheck compiler option (#43224)
When compiling your application using the AOT compiler, your templates
are type-checked according to a certain strictness level. Before Angular 9
there existed only two strictness levels of template type checking as
determined by [the `fullTemplateTypeCheck` compiler option](guide/angular-compiler-options).
In version 9 the `strictTemplates` family of compiler options has been
introduced as a more fine-grained approach to configuring how strict your
templates are being type-checked.

The `fullTemplateTypeCheck` flag is being deprecated in favor of the new
`strictTemplates` option and its related compiler options. Projects that
currently have `fullTemplateTypeCheck: true` configured can migrate to
the following set of compiler options to achieve the same level of
type-checking.

```json
{
  "angularCompilerOptions": {
    "strictTemplates": true,
    "strictInputTypes": false,
    "strictNullInputTypes": false,
    "strictAttributeTypes": false,
    "strictOutputEventTypes": false,
    "strictDomEventTypes": false,
    "strictDomLocalRefTypes": false,
    "strictSafeNavigationTypes": false,
    "strictContextGenerics": false,
  }
}
```

PR Close #43224
2021-10-04 16:32:11 -07:00
Paul Gschwendtner c15b8c75fa test: update size goldens for integration CLI tests (#43431)
Updates the size goldens for the integration CLI tests to
reflect the new payload with APF v13 and the CLI v13-next.7

Overall, there seems to be some increase in the polyfills
and a ~400b increase for the `main` bundles. This seems to
because with APF v13, the core package no longer uses the
downleveled `Object.assign`, but the spread operator directly.

ESbuild will then downlevel the spread to `__spreadProps` which
seems to come with more transitively-required helpers that
end up contributing to the ~400b increase. The spread is downleveled
even for the modern browsers this integration test targets, because
it is a trick to wrokaround a performance bug in V8. So the size
increase is reasonable given the runtime improvement. More details
here:
https://github.com/evanw/esbuild/issues/951#issuecomment-796972298.

PR Close #43431
2021-10-01 18:28:47 +00:00
Paul Gschwendtner c96ff84bdf ci: update size goldens for test_aio and test_aio_local jobs (#43431)
Updates the size goldens for the two AIO production build jobs.
Due to the removal of differential loading, the bundle names no
longer include the ES version being used, so we remove that suffix.

The styles overall decreased. Additionally, the main bundle became
noticable smaller, with a little increase in the polyfills. The AIO
job not using APF v13 seems larger but this is likely due to the current
Angular v13 packages (in the `test_aio`) job still using View Engine
APF v12 with the CLI v13 (where some optimizations might not match up anymore).

PR Close #43431
2021-10-01 18:28:47 +00:00
Paul Gschwendtner 7d886ce91c test: update all api goldens to match with new NPM package output (#43431)
Updates all API goldens to match with the new NPM package output
which now contains partial declaration static members. These
can serve as additional checks guarding against changes to
the public API (e.g. if a selector of a directive changes accidentally)

PR Close #43431
2021-10-01 18:28:43 +00:00
JoostK 8878183521 perf(core): remove support for the deprecated WrappedValue (#43507)
This commit removes the `WrappedValue` public API from `@angular/core`
which was deprecated in Angular 10 without replacement.

BREAKING CHANGE:

The `WrappedValue` class can no longer be imported from `@angular/core`,
which may result in compile errors or failures at runtime if outdated
libraries are used that are still using `WrappedValue`. The usage of
`WrappedValue` should be removed as no replacement is available.

PR Close #43507
2021-10-01 12:25:19 -04:00
JoostK 94c6dee708 refactor(compiler-cli): remove listLazyRoutes operation (#43591)
Now that `Route.loadChildren` no longer accepts a string, there is no
need for tooling to find all string-based `loadChildren` to setup lazy
imports for them. As a result, the `listLazyRoutes` operation that
enumerates all string-based `loadChildren` occurrences is no longer
needed and is therefore removed from the compiler.

The `listLazyRoutes` API remains on the `Program` interface to avoid
breaking external tools that may be using this method, but those tools
should ultimately move away from using this API.

PR Close #43591
2021-09-29 14:45:18 -07:00
JoostK 361273fad5 refactor(router): remove support for loadChildren string syntax (#43591)
This commit removes the ability to configure lazy routes using a string
for `loadChildren`, together with the supporting classes to load an
`NgModuleFactory` at runtime.

BREAKING CHANGE:

It is no longer possible to use `Route.loadChildren` using a string
value. The following supporting classes were removed from
`@angular/core`:

- `NgModuleFactoryLoader`
- `SystemJsNgModuleFactoryLoader`

The `@angular/router` package no longer exports these symbols:

- `SpyNgModuleFactoryLoader`
- `DeprecatedLoadChildren`

The signature of the `setupTestingRouter` function from
`@angular/core/testing` has been changed to drop its `NgModuleFactoryLoader`
parameter, as an argument for that parameter can no longer be created.

PR Close #43591
2021-09-29 14:45:18 -07:00
Andrew Kushnir 7dccbdd27b feat(core): add support for Types in ViewContainerRef.createComponent (#43022)
With Ivy it's possible to create a `ComponentFactory` instance based on the generated Component def, thus the `ViewContainerRef.createComponent` can accept a Component instance and create a factory inside, rather than requiring additional complexity of creating a ComponentFactory outside (by invoking `ComponentFactoryResolver`).

This should simplify the API that is used for creating components dynamically.

DEPRECATION:

Angular no longer requires component factories to dynamically create components. The factory-based signature of the `ViewContainerRef.createComponent` function is deprecated in favor of a different signature that allows passing component classes instead.

PR Close #43022
2021-09-29 13:49:13 -07:00
Andrew Kushnir 51149ab530 docs: deprecate aotSummaries usage in TestBed (#43395)
DEPRECATION:

In Ivy, AOT summary files are unused. Passing AOT summary files in TestBed has no effect, so the `aotSummaries` usage in TestBed is deprecated and will be removed in a future version of Angular.

PR Close #43395
2021-09-29 09:54:23 -07:00
Andrew Kushnir 8d34f86edb docs: deprecate PlatformRef.bootstrapModuleFactory and factory-based signature of ApplicationRef.bootstrap (#43560)
DEPRECATION:

Ivy made it possible to avoid the need to resolve Component and NgModule factories. Framework APIs allow to use Component and NgModule Types directly. As a result, the `PlatformRef.bootstrapModuleFactory` and a factory-based signature of the `ApplicationRef.bootstrap` method are now obsolete and are now deprecated.

The `PlatformRef.bootstrapModuleFactory` calls can be replaced with `PlatformRef.bootstrapModule` ones. The `ApplicationRef.bootstrap` method allows to provide Component Type, so this can be used a replacement for the factory-based calls.

PR Close #43560
2021-09-28 14:17:08 -07:00
Dmitrij Kuba 4f3beffdbf feat(router): emit activate/deactivate events when an outlet gets attached/detached (#43333)
Previously the events of `RouterOutlet` (activate/deactivate) were not fired
when an outlet got attached/detached with `RouteReuseStrategy`. The changes configure
`RouterOutlet` to emit events when an outlet gets attached/detached.

Fixes #25521, #20501

PR Close #43333
2021-09-28 14:16:39 -07:00
Kristiyan Kostadinov 66fb311d20 fix(core): incorrect signature for initTestEnvironment (#43615)
Fixes that one of the signatures of `initTestEnvironment` wasn't using the correct type.

PR Close #43615
2021-09-27 14:21:32 -07:00
Alan Agius 6f30ebbefd test: update integration payload size checks golden file (#43417)
With this change we update the integration payload size checks golden file to reflect the file names in version 13.

Some considering about the increased in file sizes
- The increase in runtime is caused by inrtroduction of Trusted Types in CLI 12.1 which causes addition bytes to be included in the file
- Other increase/decreases are caused by changes of the minifier. Since the CLI now uses ESbuild as primary minifier instead of terser.

PR Close #43417
2021-09-24 10:49:39 -07:00
iRealNirmal d9d8f950e9 feat(forms): allow disabling min/max validators dynamically (by setting the value to null) (#42978)
This commit updates the logic of the `min` and `max` validators to allow
disabling them dynamically in case `null` is provided as a value. For example: `<input
type="number" [min]="minValue">`, when `minValue` might be set to `null` in a
component class. This should allow `min` and `max` validators to be used for dynamic forms.

Note: similar support was added to the `minLength` and `maxLength`
validators earlier (see #42565).

PR Close #42978
2021-09-24 10:35:31 -07:00
George Kalpakas d1baf7cdfb fix(docs-infra): add a "skip to content" link for better accessibility (#43460)
Add a link at the top of the page that allows skipping directly to the
main content area. This allows people using assistive technologies to
skip navigation-related parts of the page which are presented before the
main content.

Related resources:
- [www.w3.org](https://www.w3.org/TR/WCAG20-TECHS/G1.html)
- [accessibility.oit.ncsu.edu](https://accessibility.oit.ncsu.edu/it-accessibility-at-nc-state/developers/accessibility-handbook/mouse-and-keyboard-events/skip-to-main-content)
- [css-tricks.com](https://css-tricks.com/how-to-create-a-skip-to-content-link)

---
Example implementations on other websites:

- **[accessibility.oit.ncsu.edu](https://accessibility.oit.ncsu.edu/)**:
  ![accessibility.oit.ncsu.edu](https://user-images.githubusercontent.com/8604205/133285834-db1314e6-ff71-4862-8f80-c8a9f69083d9.png)

- **[smile.amazon.com](https://smile.amazon.com/)**:
  ![smile.amazon.com](https://user-images.githubusercontent.com/8604205/133285854-1163e733-8de3-4244-bc23-5cd5a943001d.png)

- **[chase.com](https://chase.com/)**:
  ![chase.com](https://user-images.githubusercontent.com/8604205/133293396-ade9d95f-56ce-4cdc-8926-b4cd2dc6c3a5.png)

- **[css-tricks.com](https://css-tricks.com/)**:
  ![css-tricks.com](https://user-images.githubusercontent.com/8604205/133285845-702045ee-088a-40f1-bb26-21adebb02505.png)

- **[github.com/angular/angular](https://github.com/angular/angular)**:
  ![github.com/angular/angular](https://user-images.githubusercontent.com/8604205/133921259-9fd759b9-f862-47c3-b069-643912df17a1.png)

- **[news.sky.com](https://news.sky.com/)**:
  ![news.sky.com](https://user-images.githubusercontent.com/8604205/133285863-89946096-5353-4b2b-ab69-eb748bdcfe06.png)

- **[youtube.com](https://youtube.com/)**:
  ![youtube.com](https://user-images.githubusercontent.com/8604205/133921261-a68a12c1-1aea-4ad0-8457-b4eaf8ed3497.png)

---
Angular.io implementation:

- **[angular.io](https://angular.io/)**:
  ![angular.io](https://user-images.githubusercontent.com/8604205/133409634-0054625c-d14b-4ebe-bb4c-142cfc524d98.png)

Fixes #42936

PR Close #43460
2021-09-21 16:12:39 +00:00
Bjarki 99f63dc13b fix(docs-infra): bump aio size limit (#42800)
Increase the aio size tracking limit as a result of Trusted Types
refactoring.

PR Close #42800
2021-09-09 11:17:00 -07:00
Andrew Scott 3c6b653089 feat(router): Option to correctly restore history on failed navigation (#43289)
Exposes implementation from #38884 as a public opt-in option.

From that commit:
> We can’t determine whether the user actually meant the back or
> the forward using the popstate event (triggered by a browser
> back/forward)
> so we instead need to store information on the state and compute the
> distance the user is traveling withing the browser history.
> So by using the History#go method,
> we can bring the user back to the page where he is supposed to be after
> performing the action.

Resolves #13586

PR Close #43289
2021-09-02 17:46:35 +00:00
anandtiwary faf9f5a3bc feat(router): new output that would notify when link is activated (#43280)
This commit adds a new output to `routerLinkActive` directive.
Whenever, the associated link becomes active or inactive, an
event will be fired on this out with the correct status

PR Close #37284

PR Close #43280
2021-09-01 08:23:15 -07:00