the filter animation example in the complex-animation-sequences guide
talks about entering and leaving elements, but the presented html
snipped exluded the *ngFor which actually adds and removes the elements,
so add the *ngFor section to make the example complete and
understandable
PR Close#44544
change variable name 'next' to 'route' in route guards examples on developer guides "Routing and Navigation Tutorial: Adding routing to Tour of Heroes" to make it consistent with api docs and subsequent examples.
Fixes#44291
PR Close#44444
Currently the `HttpClient` always wraps errors from XHR requests, but
the underlying errors are always of type `ProgressEvent`, or don't have
a native error if the status code is just indicating failure (e.g. 404).
This behavior does not match in the `TestRequest` class provided by
`@angular/common/http/testing` where errors are considered being
of type `ErrorEvent`. This is incorrect because `ErrorEvent`s provide
information for errors in scripts or files which are evaluated. Since
the `HttpClient` never evaluates scripts/files, and also since XHR requests
clearly are documented to emit `ProgressEvent`'s, we should change the
`TestSupport` to retrieve such `ProgressEvent`'s instead of incompatible
objects of type `ErrorEvent`.
In favor of having a deprecation period, we keep supporting `ErrorEvent`
in the `TestRequest.error` signature. Eventually, we can remove this
signature in the future.
Resources:
* https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/error_event
* https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent
* https://xhr.spec.whatwg.org/#event-xhr-errpr
Related to: https://github.com/angular/angular/issues/34748.
DEPRECATED: `TestRequest` from `@angular/common/http/testing` no longer
accepts `ErrorEvent` when simulating XHR errors. Instead instances of
`ProgressEvent` should be passed, matching with the native browser behavior.
PR Close#36082
Example for test doesn't use typing for Jasmine Spy objects. Updated
them with `SpyObj<T>` typing as in the Angular Documentation.
See https://angular.io/guide/testing-services
PR Close#44170
Previously there was a custom version of the testing app for Stackblitz that would run the tests in the browser.
With the web-container approach, this is no longer necessary since the tests can be run directly from the command line.
Fixes#44047
PR Close#44085
Previously, the SystemJS-based docs examples (typically `ngUpgrade`
examples) were not compatible with Angular v13 (due to the removal of
UMD bundles from the published packages).
This commit makes the examples compatible with Angular v13 and
re-enables the tests for all SystemJS-based examples on CI.
PR Close#43868
Use the cross-platform `copyfiles` package instead of using `cp` which fails on Windows machines when copying files in the `postbuild` script of the "schematics-for-libraries" example.
PR Close#30966
This commit enable the `noImplicitOverride` and
`noPropertyAccessFromIndexSignature` TypeScript compiler options for
docs examples to better align with the default configuration of new
Angular CLI apps. It also makes the necessary changes to the docs
examples source code.
PR Close#43880
This commit updates the docs examples to Angular v13.0.0-rc.0. In
addition to updating the dependency versions, it also updates the
projects' structure and configs to more closely match what a new v13 CLI
app would look like. See, also, the [diff][1] between a basic v12.1.3
CLI app and a v13.0.0-rc.0 one.
(NOTE: v12.1.3 was the last version for which we aligned the projects
with how a new CLI app would look like.)
Additionlly:
- Since we now use RxJS v7 in docs examples, this commit removes the
extra CI steps to explicitly test the docs examples against RxJS v7.
- Since Angular v13 no longer supports IE, this commit removes an
IE-specific section from `upgrade-setup.md`.
[1]: https://github.com/cexbrayat/angular-cli-diff/compare/12.1.3..13.0.0-rc.0
PR Close#43880
Due to how `debounceTime()` works in RxJS v7, Jasmine's mock clock was
not enough to trigger it. This commit fixes it by providing a similar
mock clock that is able to mock all of `Date.now()`, `setInterval()` and
`setTimeout()`.
PR Close#43880
the tsconfig.json file in aio/content/examples does not seem necessary
anymore as it was only used for tslinting and tslint has been removed
from the examples in PR #43592 and PR #43746
PR Close#43818
remove the deprecated tslint from the examples of type systemjs
note: eslint hasn't be applied and linting has been removed entirely
to follow angular's unopinionated view on linting
PR Close#43746
remove linting from the i18n angular.json example as that is no longer
present in the boilerplace angular.json (and the two should be kept in
sync)
note: the linting was removed from the boilerplate angular.json file in PR #43592
PR Close#43747
The `skipTemplateCodegen`, `strictMetadataEmit` and
`enableResourceInlining` options are specific to ViewEngine and have no
effect when using the Ivy compiler. Since libraries can no longer be
compiled using ViewEngine from Angular 13, this commit removes these
options entirely.
The `annotateForClosureCompiler` is also no longer recommended to use,
as Closure Compiler is not supported outside of Bazel.
Finally, the `fullTemplateTypeCheck` flag is changed into
`strictTemplates` as the former flag is being deprecated. Enabling
`strictTemplates` does result in more strict type-checking than with
only `fullTemplateTypeCheck` enabled, but simply removing
`fullTemplateTypeCheck` right away would result in less strict
type-checking which is not desired.
PR Close#43224
remove the deprecated tslint from the examples of type cli
note: eslint hasn't be applied and linting has been removed entirely
to follow angular's unopinionated view on linting
PR Close#43592
DEPRECATION:
The template prefixes `bind-`, `on-`, `bindon-`, and `ref-` have been deprecated
in v13. Templates should use the more widely documented syntaxes for binding and references:
* `[input]="value"` instead of `bind-input="value"`
* `[@trigger]="value"` instead of `bind-animate-trigger="value"`
* `(click)="onClick()"` instead of `on-click="onClick()"`
* `[(ngModel)]="value"` instead of `bindon-ngModel="value"`
* `#templateRef` instead of `ref-templateRef`
PR Close#43671
We updated the dev-infra version as part of the v13 package format
in order to be able to use the latest `rollup` version (and its
plugins). The update of the shared dev-infra package resulted in an
update of Chromium to a more recent version. This version of Chromium
seems to normalize the `content-type` header differently, so that the
AIO `http` example test assertion needs to be updated to work with the
new version of chromium. This commits updates the test.
PR Close#43431
add a button type in the example of creating a dynamic form so that the button that adds the alias control does not submit the entire form
PR Close#43666
Many of the tests in the router code use the deprecated loadChildren as a string. This
has been deprecated for years and can easily be changed to just a function that
returns the module.
PR Close#43578
Previously the `http` example did accessed the npmsearch.com website to demonstrate response caching.
But if this service became unavailable then the example (and its e2e tests) would fail.
This commit changes the example to use the in-memory-web-api for this lookup, which will not be affected by 3rd party outages.
The guide that references this example has been updated to avoid references to the original npm search service.
PR Close#43475
Note that because `angular.json` is a "boilerplate" file we cannot
just add comments to the one that is actually used in the application.
Instead this commit makes a copy, which is annotated with docregions.
To ensure that this file is not ignored by the example-collector, we had to
update the `.gitignore` to not ignore this file. (This also allows the file to be
easily stored tracked in git).
PR Close#43216