571 Commits

Author SHA1 Message Date
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
Kapunahele Wong
4d1299bd82 docs: improve accessibility of toh-pt5 example ()
PR Close 
2021-02-23 10:39:13 -08:00
Kapunahele Wong
edd26a2b79 docs: improve accessibility of toh-pt6 ()
PR Close 
2021-02-23 10:38:50 -08:00
Kapunahele Wong
49e02ca7d6 docs: move JsonParser class above CustomJsonInterceptor ()
This move fixes the error in StackBlitz of
Cannot access 'JsonParser' before initialization

PR Close 
2021-02-23 10:37:26 -08:00
Kapunahele Wong
30d5e25a28 docs: edit attribute-directives.md, move best practice to styleguide ()
PR Close 
2021-02-19 08:14:54 -08:00
David Shevitz
8658cd59b2 docs: add what is angular topic ()
PR Close 
2021-02-17 11:13:21 -08:00
Pete Bacon Darwin
322951af49 refactor(compiler-cli): error on cyclic imports in partial compilation ()
Our approach for handling cyclic imports results in code that is
not easy to tree-shake, so it is not suitable for publishing in a
library.

When compiling in partial compilation mode, we are targeting
such library publication, so we now create a fatal diagnostic
error instead of trying to handle the cyclic import situation.

Closes 

PR Close 
2021-02-17 06:53:38 -08:00
Kapunahele Wong
75db0c7445 docs: edit builtin-directives doc ()
Edit built-in-directives.md copy and headers, fixes affected
links, adds a docregion to make steps clearer.

PR Close 
2021-02-16 13:04:41 -08:00
Alexey Elin
dd3dd63845 docs: use shorthand background CSS property in Routing example ()
PR Close 
2021-02-16 09:26:26 -08:00
Pete Bacon Darwin
d6440c1808 docs: fix missing code line from tutorial example ()
In  we move the code that creates the `heroes` object
above the code that updates the message service. But this moved
that line of code outside of the docregion that is displayed in
the tutorial ealier on, making it non-sensical.

This commit ensures that this line of code is now rendered in the
tutorial be moving it within the correct docregion.

Closes 

PR Close 
2021-02-16 08:40:26 -08:00
Pete Bacon Darwin
529f0a83cb docs(http): add custom JSONParser example ()
Update the HTTP guide and associated example to demonstrate
how an interceptor can be used to provide a custom JSON parser.

Resolves 

PR Close 
2021-02-16 08:03:33 -08:00
Dan Levy
72db3e8d54 docs: add camelCase example to style notation ()
PR Close 
2021-02-16 07:59:40 -08:00
mgechev
72a00dcc6b docs: add a style recommendation for initializing inputs ()
This practice is to better align with `strictPropertyInitialization`
which is coming by default with strict mode in v12.

PR Close 
2021-02-12 17:07:30 -08:00
Valerij Dobler
2a851c0924 docs: edit example to fetch hero before sending message ()
PR Close 
2021-02-09 14:46:18 -08:00
Kapunahele Wong
f76f2eb381 docs: update docs-style-guide ()
This commit updates the documentation style guide
so that it is in line with current standards, those
of Google as well as those within the Angular docs.

PR Close 
2021-02-09 14:26:06 -08:00
hilmer-martin
e3213f6783 docs: changes for typescript 2.7 ()
Because of changes in Typescript a property must have an initializer
or be set to undefined.

PR Close 
2021-02-09 10:52:44 -08:00
S. Iftekhar Hossain
365ac5e68e docs: fixed issue with missing code sample by rearranging import to proper docregion ()
Fixes 

PR Close 
2021-01-26 09:17:28 -08:00
Wataru.Kasahara
956f75f068 docs: fix the docs because the interface does not exist ()
PR Close 
2021-01-25 16:29:13 -08:00
Justin Santa Barbara
a78493ffd7 docs: Fix syntax in interpolation example ()
Correcting a typo in the example.
PR Close 
2021-01-25 09:59:50 -08:00