613 Commits

Author SHA1 Message Date
Bastian
50b6aae029 docs: fix http example to show actual message in console ()
Previously, the error message in the console would print `[object Object]`
and not the actual error message. With this change, the error message is
printed in the console.

PR Close 
2021-07-09 10:14:35 -07:00
Ryan Andersen
e064f177a7 docs: add missing import to CartService tutorial instructions ()
PR Close 
2021-07-07 09:54:55 -07:00
pavlenko
f3965ff834 docs: setting context value inside an interceptor ()
Usage of `get`/`set` methods should be done on a context object instead of a `HttpRequest` instance.

PR Close 
2021-06-30 09:13:46 -07:00
George Kalpakas
02742552f3 refactor(docs-infra): make angular.io and docs examples compatible with RxJS v7 ()
This commit applies the necessary changes to make angular.io and (most)
docs examples compatible with both RxJS v6 and v7. It also adds new
steps to relevant CI jobs to test angular.io and docs examples against
RxJS v7 as well (to catch potential regressions).

NOTE:
Some of the docs examples are not compatible with RxJS v7 and are
therefore excluded from the tests. The SystemJS-based ngUpgrade
examples in particular are excluded, since they require a different
SystemJS configs to run against RxJS v6 and v7 and the extra complexity
of managing that is not worth it for the 4 affected examples.

PR Close 
2021-06-29 10:29:58 -07:00
Pham Huu Hien
ec90d8d5e5 docs: change field name from id to $id in schema.json file ()
fix error "SchematicsMyService" schema is using the keyword "id" which its support is deprecated. Use "$id" for schema ID.

PR Close 
2021-06-10 14:03:00 -07:00
Kapunahele Wong
e299683692 docs: improve accessibility of router example ()
PR Close 
2021-06-10 10:28:33 -07:00
Pete Bacon Darwin
e36c5b4c86 docs: fix ngProjectAs selector in example ()
Fixes 

PR Close 
2021-06-09 12:10:20 -07:00
Sam Severance
f3fde4bbb5 docs: Add selector for PeekABooDirective ()
PR Close 
2021-06-08 12:46:06 -07:00
Kapunahele Wong
f33fa04fb8 docs: improve accessibility of animations example ()
PR Close 
2021-06-08 12:43:32 -07:00
Kapunahele Wong
386550cdf3 docs: improve accessibility of reactive-forms example ()
PR Close 
2021-06-08 12:42:20 -07:00
Kapunahele Wong
0031c8cf41 docs: improve accessibility of attribute-binding example ()
PR Close 
2021-06-08 12:16:54 -07:00
Kapunahele Wong
4ff636d24d docs: improve accessibility of pipes example ()
PR Close 
2021-06-08 12:16:08 -07:00
Pete Bacon Darwin
645cad5614 docs(core): describe interactions between view-encapsulated components ()
This commit adds information to the view encapsulation guide that
describes the styling interactions between components that use differing
view encapsulation modes.

Closes 

PR Close 
2021-06-08 10:39:52 -07:00
Andrew Kushnir
f4c55e464a docs: provide more info on the NO_ERRORS_SCHEMA schema ()
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 .

PR Close 
2021-06-07 10:46:34 -07:00
Sam Severance
c0b2eeb54c docs: remove unused imports from unit tests ()
PR Close 
2021-06-02 13:22:09 -07:00
Sam Severance
c1a9f07ea1 docs: refactor WelcomeComponent unit test ()
PR Close 
2021-06-02 13:22:08 -07:00
Igor Minar
1fe1dd1f19 docs: clarify the wording around live examples for all testing guides ()
We should primarily point readers to the stackblitz that contains the spec files and runs them.

The application stackblitz is secondary (and doesn't actually contain the spec files, which is confusing).

Fixes 

PR Close 
2021-06-02 13:20:13 -07:00
Dylan Hunn
c54643f00e docs(forms): make the forms validation guide specify more clearly what happens when mixing HTML5 native validators with Angular forms. ()
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 
2021-06-01 10:13:36 -07:00
Doug Parker
e0381a87c9 docs: update CLI builder to be platform agnostic ()
Fixes .

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 
2021-06-01 10:13:02 -07:00
Andrew Kushnir
e917d57dbb docs: use json pipe in Forms guide instead of a temporary diagnostic field ()
Closes .

PR Close 
2021-05-26 15:47:05 -07:00
David Shevitz
de8a6ae9ed docs: add example that exports a part of an animation for reuse ()
Fixes 

PR Close 
2021-05-26 20:06:28 +00:00
Andrew Kushnir
b2eab977d9 docs: remove entryComponents references from the custom elements guide ()
Since `entryComponents` field is deprecated and no longer used in Ivy, this commit removes `entryComponents` references from the custom elements guide.

Closes .

PR Close 
2021-05-26 20:06:00 +00:00
Sam Severance
da1a868ec2 docs: add missing await to BannerComponent unit test ()
PR Close 
2021-05-26 20:03:46 +00:00
Sam Severance
caf15da651 docs: fix BannerComponent unit tests ()
remove `async` and `await` from `BannerComponent` test because the
component uses an inline template and styles

create doc region in `banner-external.component.spec.ts` demonstrating
test setup that may fail due to a missing call to `.compileComponents()`
for a component with an external template and stylesheet

PR Close 
2021-05-26 20:03:46 +00:00
Sam Severance
74ebdf6fdc docs: refactor HeroDetailComponent and unit test ()
remove `@Input()` decorator from `hero` property because the component
is designed to get the hero via a service, not an input binding.

add `HTMLElement` type to `HeroDetailComponent` unit test

PR Close 
2021-05-26 20:00:35 +00:00
Pete Bacon Darwin
c2ed612da3 docs: convert the last my-app components to app-root ()
Most of these were fixed in other PRs but there were are couple of stragglers.
Note that `my-app` components in non-documentation facing code, such as
compliance tests have not been changed.

Fixes 

PR Close 
2021-05-25 22:13:36 +00:00
Sam Severance
29ece98744 docs: asynchronous test spy method ()
fixes two `HeroService` tests that were synchronously
testing an asynchronous spy method

PR Close 
2021-05-24 15:18:43 -07:00
Sam Severance
ad12b31c27 docs: unsubscribe from observables ()
Add rxjs `first` operator in `DashboardHeroComponent` unit
tests to ensure unsubscription from observables

PR Close 
2021-05-24 15:16:52 -07:00
George Kalpakas
c820066d98 docs: align code in product-example.component.*.ts files ()
This commit aligns the code in `product-alerts.component.ts` with
[product-alerts.component.1.ts][1], since both files are supposed to
represent the same component in different points in time. It also makes
the necessary changes in the respective templates.

This is a follow-up to .

[1]: e86a1d3441/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts (L18)

PR Close 
2021-05-24 19:26:26 +00:00
Pete Bacon Darwin
e16778d371 docs: fix multicasting observable example ()
The example did not allow the async sequence to be cancelled
after the first timeout had completed.

Fixes 

PR Close 
2021-05-24 18:17:34 +00:00
chenyunhsin
3293dd34ca docs: add missing Product interface to example ()
Fixes 

PR Close 
2021-05-21 22:14:47 +00:00
iRealNirmal
03825cfab6 docs: updated animation docs intro section and example ()
This commit updates the animation docs and provides better clarity for open-close component with it also added click event in open-close.component

Closes 

PR Close 
2021-05-21 18:09:26 +00:00
Sam Severance
62becc88f9 fix(docs-infra): fix example compilation issues ()
Fix an issue that prevented the Http (tests) StackBlitz
and Testing (tests) StackBlitz from compiling.

Resolves 

PR Close 
2021-05-21 18:07:44 +00:00
David Shevitz
99f5b872e1 docs: add new tutorial that explains how to use the UrlMatcher for custom route matching ()
PR Close 
2021-05-20 23:05:32 +00:00
Sam Severance
63383c186d docs: use ValidationErrors interface in Form validation examples ()
PR Close 
2021-05-18 10:14:02 -07:00
iRealNirmal
5885cf5ad8 build(docs-infra): fixed broken stackblitz examples ()
This commit fixes the broken stackblitz examples.

Closes  .

PR Close 
2021-05-18 08:34:40 -07:00
Kristiyan Kostadinov
e86a1d3441 docs: make all examples compatible with strict mode ()
Turns on the `strict` compiler flag and resolves the compilation errors in the various AIO examples.

PR Close 
2021-05-17 10:42:18 -07:00
iRealNirmal
e071e3b507 build(docs-infra): fixed i18n broken stackblitz example ()
This commit fixes the broken stackblitz example of i18n.

Closes .

PR Close 
2021-05-10 16:11:34 -04:00
iRealNirmal
2b939767fe docs: update testing components doc with generated compileComponent ()
Updated testing-components-scenarios.md to match CLI generated test case.

Closes 

PR Close 
2021-05-06 15:40:36 -04:00
David Shevitz
c472c5b872 docs: initial commit of content projection topic. ()
Content projection is an important part of Angular. However, it has
never been documented in the Angular documentation set. This topic
attempts to provide the basics of content projection for developers. It
is not a comprehensive guide; rather, it is a starting point that we
can hopefully expand upon in the future.

PR Close 
2021-05-05 13:47:27 -07:00
Hugo Mejia
b3cd1280da docs: attributes for 'label' and 'input' elements were mixed up ()
A label should be 'for' an input, and an 'input' should have an 'id'.

PR Close 
2021-05-04 08:32:17 -07:00
Kapunahele Wong
253ed5d484 docs: improve accessibility of form-validation example ()
PR Close 
2021-05-03 14:25:11 -07:00
Wojciech Okoński
ea89617880 docs(docs-infra): fix handling of client-side errors in networking ()
Previously example for handling client-side errors in networking didn't work when there was no Internet connection.
Caught error is ProgressEvent in such case, not ErrorEvent and error.error.message is undefined.

PR Close 
2021-04-29 13:51:42 -07:00
Kapunahele Wong
695b72a972 docs: imrpove accessibility of lifecycle hooks example ()
PR Close 
2021-04-28 14:26:34 -07:00
Kapunahele Wong
09abee359d docs: add metadata documentation to httpClient ()
PR Close 
2021-04-26 15:17:51 -07:00
Kapunahele Wong
01e546f116 docs: improve accessibility of architecture example ()
PR Close 
2021-04-26 09:13:49 -07:00
Kapunahele Wong
326884736e docs: make inputs-outputs example more accessible ()
PR Close 
2021-04-26 09:12:17 -07:00
Kapunahele Wong
70fb3e958b docs: improve accessibility of http example ()
PR Close 
2021-04-26 09:11:07 -07:00
Pete Bacon Darwin
70341bcfed build(docs-infra): update docs examples to Angular v11.2.10 ()
This commit updates the docs examples to Angular v11.2.10. See the [diff between 11.0.1 and 11.2.10 (FW) and 11.2.9 (CLI)][1].

The changes are fairly trivial including:

- Removal of `emitDecoratorMetadata` from tsconfig.json files, where no JIT compilation is required.
- Setting `enableI18nLegacyMessageIdFormat` to `false` for CLI based applications - the i18n example was already migrated away from legacy message IDs.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.2.9..11.0.1

PR Close 
2021-04-19 14:18:51 -07:00
Pete Bacon Darwin
1573510187 refactor(docs-infra): tidy up systemjs boilerplate for upgrade examples ()
The ngUpgrade examples mostly rely upon SystemJS configuration.
This commit tidies up how these examples are built and tested so that
it will be easier to migrate them to work with Angular 11.2.x

PR Close 
2021-04-19 14:18:51 -07:00