589 Commits

Author SHA1 Message Date
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
Pete Bacon Darwin
e06f1960f4 docs: migrate example to use non-legacy message IDs ()
From 11.x, new projects are set up to use the latest message ID format.
This commit updates the i18n example project to stop using legacy IDs.

PR Close 
2021-04-19 14:18:51 -07:00
Bendik Skarpnes
5e343173e8 docs: fix styling issues in example CSS ()
PR Close 
2021-04-19 14:15:45 -07:00
aschaap
5e8dcfd641 docs(docs-infra): fix (+) not accepting null error by using Number instead ()
Fix unexpected error when following the tutorial (when going through it with stricter type checking enforced). While (+) converts a string to an integer, it does not account for the possibility that `this.route.snapshot.paramMap.get('id')` could return null (type: string | null). Since this null case is not a practical outcome, it is a matter of types; switching from (+) to the `Number` function eliminates this issue, making the tutorial more robust.
PR Close 
2021-04-12 21:08:21 -07:00
Alan Cohen
319da894be docs: change ActivatedRouteStub code sample to work with strictNullChecks on ()
convertToParamMap() does not accept undefined.
Fix code sample so it can be used in strict mode without requiring changes.

PR Close 
2021-04-12 21:01:39 -07:00
Paul Muriel Biya-Bi
5a81490554 docs: use the right tag in the HeroesComponent's template snippet ()
Based on the tutorial content of the Hero Editor, the tag to be used in
HeroesComponent's template snippet should be h2 and not h3.

PR Close 
2021-04-07 11:51:37 -07:00
Kapunahele Wong
e340d190bd docs: add some boilerplate button, h3, and hr styles ()
PR Close 
2021-03-23 09:37:59 -07:00
MariosRadis
ed5bfe8173 docs: simplify deleteHero method in tutorial ()
Fixes 

PR Close 
2021-03-22 08:54:53 -07:00
George Kalpakas
e23994191c docs: make HeroService#gerHero() in toh-pt5 compatible with TS strict mode ()
Fixes 

PR Close 
2021-03-18 10:00:52 -07:00
George Kalpakas
6d47b05b5b docs: align toh-pt5 code with toh-pt4 ()
This commit aligns the code of `HeroService` `getHeroes()` and
`getHero()` methods in `toh-pt5` with that of `toh-pt4`. I.e. it applies
the changes from  to `toh-pt5`.

PR Close 
2021-03-18 10:00:52 -07:00
Kristiyan Kostadinov
59ef40988e feat(core): support TypeScript 4.2 ()
Updates the repo to TypeScript 4.2 and tslib 2.1.0.

PR Close 
2021-03-17 09:10:25 -07:00
Gérôme Grignon
7d5b60e409 docs: remove unused attribute ()
Fixes 

PR Close 
2021-03-16 14:48:52 -07:00
pniedermeyer
4c79b8a644 docs: Remove of unnecessary Input ()
remove unnecessary Input

PR Close 
2021-03-10 11:20:01 -08:00
Aristeidis Bampakos
a730315fb2 docs: use double quotes in Tour of Heroes (pt1) ()
Use double quotes to be consistent across the component template

PR Close 
2021-03-09 08:56:50 -08:00
Quentin Monmert
c676ec1ce5 docs: fix some typos in angular.io examples ()
This commit updates example code to make the spacing more consistent.

PR Close 
2021-03-05 15:08:11 -08:00
Carl Fredrik Samson
e7453f15d5 docs: fix issue ()
setting the `hero` property as an optional property fixes the compilation
error: `Property 'hero' has no initializer and is not definitely assigned
in the constructor` when having the ts transpiler set to "strict" mode.

PR Close 
2021-03-05 09:47:44 -08:00
Kapunahele Wong
6c783c7fcb docs: rewrite structural-directives.md ()
PR Close 
2021-03-01 15:32:26 -08:00
Kapunahele Wong
356d9a0537 docs: improve contrast of colors and body padding in boilerplate CSS ()
Shifts colors to pass WebAIM contrast checker and adds media
query so that body padding is smaller at smaller widths.
Body padding responsiveness will help on StackBlitz and small
screens.

PR Close 
2021-03-01 15:30:32 -08:00
Pete Bacon Darwin
4859c0947a build(docs-infra): implement full template checking for examples ()
This commit turns on full template type checking and fixes the examples
that had errors.

PR Close 
2021-02-26 15:40:44 -08:00
Alan Agius
d51d39cb4c docs: update docs to use new zone.js entry-points ()
In CLI version 12, the old style of imports is no longer supported.

PR Close 
2021-02-24 07:58:29 -08:00
Carl Fredrik Samson
03de2f2b78 docs: fix ch 4 so it compiles in strict mode ()
Fixes error: `TS2564: Property 'heroes' has no initializer and is not definitely assigned in the constructor`
and makes `hero` property consistent with ch 3 (ref: )

PR Close 
2021-02-24 07:57:53 -08:00
Kapunahele Wong
06d3267824 docs: improve accessibility for toh-pt1 example ()
PR Close 
2021-02-23 10:41:56 -08:00
Kapunahele Wong
1f91672d50 docs: improve accessibility of toh2 example ()
Increases contrast of example copy.
Explicitly references inputs from labels.
Updates screenshot of styles that aren't accessible.
Removes the term master.
Provides more detailed alternate text for the image.
Adds padding to input so it is an easier target for touch or pointer.

PR Close 
2021-02-23 10:41:05 -08:00
Kapunahele Wong
1f7921be33 docs: improve accessibility of tohpt3 ()
PR Close 
2021-02-23 10:40:09 -08:00
Kapunahele Wong
bd6f377db2 docs: improve accessibility of tohpt4 ()
PR Close 
2021-02-23 10:39:44 -08:00