Commit graph

566 commits

Author SHA1 Message Date
Kapunahele Wong
7756ead0bf docs: add metadata documentation to httpClient (#41706)
PR Close #41706
2021-04-26 15:17:52 -07:00
Kapunahele Wong
8ea1927910 docs: improve accessibility of architecture example (#41314)
PR Close #41314
2021-04-26 09:13:51 -07:00
Kapunahele Wong
619f774dbd docs: make inputs-outputs example more accessible (#41288)
PR Close #41288
2021-04-26 09:12:19 -07:00
Kapunahele Wong
f31277879a docs: improve accessibility of http example (#41057)
PR Close #41057
2021-04-26 09:11:08 -07:00
Pete Bacon Darwin
8f3e5a5982 build(docs-infra): update docs examples to Angular v11.2.10 (#41689) (#41716)
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 #41689

PR Close #41716
2021-04-20 13:13:09 -07:00
Pete Bacon Darwin
81260c4009 refactor(docs-infra): tidy up systemjs boilerplate for upgrade examples (#41689) (#41716)
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 #41689

PR Close #41716
2021-04-20 13:13:09 -07:00
Bendik Skarpnes
2a136e2eda docs: fix styling issues in example CSS (#41222)
PR Close #41222
2021-04-19 14:15:46 -07:00
aschaap
4795c5e7d8 docs(docs-infra): fix (+) not accepting null error by using Number instead (#41570)
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 #41570
2021-04-12 21:08:22 -07:00
Alan Cohen
db90ba40eb docs: change ActivatedRouteStub code sample to work with strictNullChecks on (#41559)
convertToParamMap() does not accept undefined.
Fix code sample so it can be used in strict mode without requiring changes.

PR Close #41559
2021-04-12 21:01:40 -07:00
Paul Muriel Biya-Bi
46f1cf27c0 docs: use the right tag in the HeroesComponent's template snippet (#41473)
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 #41473
2021-04-07 11:51:38 -07:00
Kapunahele Wong
8cac76731e docs: add some boilerplate button, h3, and hr styles (#41052)
PR Close #41052
2021-03-23 09:38:00 -07:00
MariosRadis
74b2d4aa7f docs: simplify deleteHero method in tutorial (#41303)
Fixes #41233

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

PR Close #41234
2021-03-18 10:00:53 -07:00
George Kalpakas
9a1abe2164 docs: align toh-pt5 code with toh-pt4 (#41234)
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 #40419 to `toh-pt5`.

PR Close #41234
2021-03-18 10:00:53 -07:00
Gérôme Grignon
18cd7bbd9b docs: remove unused attribute (#41211)
Fixes #41210

PR Close #41211
2021-03-16 14:48:53 -07:00
pniedermeyer
2fa231a83c docs: Remove of unnecessary Input (#41150)
remove unnecessary Input

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

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

PR Close #41093
2021-03-05 15:08:12 -08:00
Carl Fredrik Samson
2de7eef92e docs: fix issue #40941 (#40942)
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 #40942
2021-03-05 09:47:46 -08:00
Kapunahele Wong
71921e8268 docs: rewrite structural-directives.md (#40015)
PR Close #40015
2021-03-01 15:32:27 -08:00
Kapunahele Wong
3f90336266 docs: improve contrast of colors and body padding in boilerplate CSS (#40890)
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 #40890
2021-03-01 15:30:33 -08:00
Pete Bacon Darwin
6efd5ee779 build(docs-infra): implement full template checking for examples (#40930)
This commit turns on full template type checking and fixes the examples
that had errors.

PR Close #40930
2021-02-26 15:40:45 -08:00
Carl Fredrik Samson
08372a1d24 docs: fix ch 4 so it compiles in strict mode (#40970)
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: #40942)

PR Close #40970
2021-02-24 07:57:53 -08:00
Kapunahele Wong
c6e2234fa6 docs: improve accessibility for toh-pt1 example (#40560)
PR Close #40560
2021-02-23 10:41:56 -08:00
Kapunahele Wong
b23c8bbec0 docs: improve accessibility of toh2 example (#40575)
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 #40575
2021-02-23 10:41:05 -08:00
Kapunahele Wong
437a081384 docs: improve accessibility of tohpt3 (#40617)
PR Close #40617
2021-02-23 10:40:09 -08:00
Kapunahele Wong
320542ba3c docs: improve accessibility of tohpt4 (#40622)
PR Close #40622
2021-02-23 10:39:44 -08:00
Kapunahele Wong
4761222bde docs: improve accessibility of toh-pt5 example (#40632)
PR Close #40632
2021-02-23 10:39:13 -08:00
Kapunahele Wong
fc39ec42a6 docs: improve accessibility of toh-pt6 (#40805)
PR Close #40805
2021-02-23 10:38:50 -08:00
Kapunahele Wong
afa234d41c docs: move JsonParser class above CustomJsonInterceptor (#40964)
This move fixes the error in StackBlitz of
Cannot access 'JsonParser' before initialization

PR Close #40964
2021-02-23 10:37:26 -08:00
Kapunahele Wong
4e84b2f3ac docs: edit attribute-directives.md, move best practice to styleguide (#39849)
PR Close #39849
2021-02-19 08:14:55 -08:00
David Shevitz
e74365dd35 docs: add what is angular topic (#40811)
PR Close #40811
2021-02-17 11:13:21 -08:00
Pete Bacon Darwin
cc99aec703 refactor(compiler-cli): error on cyclic imports in partial compilation (#40782)
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 #40678

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

PR Close #39816
2021-02-16 13:04:41 -08:00
Alexey Elin
b7d9761008 docs: use shorthand background CSS property in Routing example (#40834)
PR Close #40834
2021-02-16 09:26:27 -08:00
Pete Bacon Darwin
bc816de4b5 docs: fix missing code line from tutorial example (#40789)
In #40419 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 #40788

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

Resolves #21079

PR Close #40645
2021-02-16 08:03:33 -08:00
Dan Levy
0b401cce51 docs: add camelCase example to style notation (#40699)
PR Close #40699
2021-02-16 07:59:41 -08:00
mgechev
91c68f498e docs: add a style recommendation for initializing inputs (#40698)
This practice is to better align with `strictPropertyInitialization`
which is coming by default with strict mode in v12.

PR Close #40698
2021-02-12 17:07:30 -08:00
Valerij Dobler
3b0c51e045 docs: edit example to fetch hero before sending message (#40419)
PR Close #40419
2021-02-09 14:46:18 -08:00
Kapunahele Wong
c0d1e34d53 docs: update docs-style-guide (#36281)
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 #36281
2021-02-09 14:26:06 -08:00
hilmer-martin
67333a98b9 docs: changes for typescript 2.7 (#40735)
Because of changes in Typescript a property must have an initializer
or be set to undefined.

PR Close #40735
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 (#40565)
Fixes #40558

PR Close #40565
2021-01-26 09:17:28 -08:00
Wataru.Kasahara
956f75f068 docs: fix the docs because the interface does not exist (#40308)
PR Close #40308
2021-01-25 16:29:13 -08:00
Justin Santa Barbara
a78493ffd7 docs: Fix syntax in interpolation example (#40554)
Correcting a typo in the example.
PR Close #40554
2021-01-25 09:59:50 -08:00
Kapunahele Wong
51d6aed677 docs: clarify name collision info, add example snippet, and fix example CSS (#40451)
Fixes #40403 and fixes imgs and layout of example
that are unrestrained and thus are too big in StackBlitz.

PR Close #40451
2021-01-20 16:13:43 -08:00
Pete Bacon Darwin
315b272f9f docs: add missing type parameter to testing example (#40479)
Without this type parameter the call to `resolve()` is invalid.

PR Close #40479
2021-01-20 16:12:15 -08:00
Pete Bacon Darwin
4a9f7daf37 docs: remove unused "docregions" (#40479)
This commit removes all the docregion tags in examples that are not
being referenced in any doc.

PR Close #40479
2021-01-20 16:12:15 -08:00
abarghoud
2c95f57266 feat(docs-infra): use Record type instead of key-value (#40463)
use Record type instead of key-value

Closes #39804

PR Close #40463
2021-01-19 09:21:23 -08:00
Bill Ludwig
5013a7e12d docs: update identity-revealed.directive.ts to use AbstractControl instead of FormGroup (#40132)
Changes example code to accept an `AbstractControl` instead of `FormGroup` in
`identityRevealedValidator` function.

Closes #40131.

PR Close #40132
2021-01-13 14:47:53 -08:00