Commit Graph

556 Commits

Author SHA1 Message Date
George Kalpakas e23994191c docs: make `HeroService#gerHero()` in `toh-pt5` compatible with TS strict mode (#41234)
Fixes #41207

PR Close #41234
2021-03-18 10:00:52 -07:00
George Kalpakas 6d47b05b5b 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:52 -07:00
Kristiyan Kostadinov 59ef40988e feat(core): support TypeScript 4.2 (#41158)
Updates the repo to TypeScript 4.2 and tslib 2.1.0.

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

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

PR Close #41150
2021-03-10 11:20:01 -08:00
Aristeidis Bampakos a730315fb2 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:50 -08:00
Quentin Monmert c676ec1ce5 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:11 -08:00
Carl Fredrik Samson e7453f15d5 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:44 -08:00
Kapunahele Wong 6c783c7fcb docs: rewrite structural-directives.md (#40015)
PR Close #40015
2021-03-01 15:32:26 -08:00
Kapunahele Wong 356d9a0537 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:32 -08:00
Pete Bacon Darwin 4859c0947a 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:44 -08:00
Alan Agius d51d39cb4c docs: update docs to use new zone.js entry-points (#40823)
In CLI version 12, the old style of imports is no longer supported.

PR Close #40823
2021-02-24 07:58:29 -08:00
Carl Fredrik Samson 03de2f2b78 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 06d3267824 docs: improve accessibility for toh-pt1 example (#40560)
PR Close #40560
2021-02-23 10:41:56 -08:00
Kapunahele Wong 1f91672d50 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 1f7921be33 docs: improve accessibility of tohpt3 (#40617)
PR Close #40617
2021-02-23 10:40:09 -08:00
Kapunahele Wong bd6f377db2 docs: improve accessibility of tohpt4 (#40622)
PR Close #40622
2021-02-23 10:39:44 -08:00
Kapunahele Wong 4d1299bd82 docs: improve accessibility of toh-pt5 example (#40632)
PR Close #40632
2021-02-23 10:39:13 -08:00
Kapunahele Wong edd26a2b79 docs: improve accessibility of toh-pt6 (#40805)
PR Close #40805
2021-02-23 10:38:50 -08:00
Kapunahele Wong 49e02ca7d6 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 30d5e25a28 docs: edit attribute-directives.md, move best practice to styleguide (#39849)
PR Close #39849
2021-02-19 08:14:54 -08:00
David Shevitz 8658cd59b2 docs: add what is angular topic (#40811)
PR Close #40811
2021-02-17 11:13:21 -08:00
Pete Bacon Darwin 322951af49 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 75db0c7445 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 dd3dd63845 docs: use shorthand background CSS property in Routing example (#40834)
PR Close #40834
2021-02-16 09:26:26 -08:00
Pete Bacon Darwin d6440c1808 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 529f0a83cb 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 72db3e8d54 docs: add camelCase example to style notation (#40699)
PR Close #40699
2021-02-16 07:59:40 -08:00
mgechev 72a00dcc6b 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 2a851c0924 docs: edit example to fetch hero before sending message (#40419)
PR Close #40419
2021-02-09 14:46:18 -08:00
Kapunahele Wong f76f2eb381 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 e3213f6783 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
Kapunahele Wong 184d0e568f docs: edit getting started start-forms.md (#39681)
PR Close #39681
2021-01-11 15:34:12 -08:00
Alexey Elin aea265bfc5 docs: lifecycle-hooks example - extract things (components, directives) into their own files (#40212)
This change is in line with Angular Style Guide rule 01-01
https://angular.io/guide/styleguide#style-01-01.

PR Close #40212
2021-01-07 13:10:41 -08:00
George Kalpakas 1e151f9fe4 docs: fix instructions for setting up `ProductDetailsComponent` in `start-routing.md` (#40197)
PR #34934 switched the `getting-started` docs example from using the
index of a product in the `products` array to using the product's ID
property for indentifiying each product in the `ProductDetailsComponent`
component. However, some necessary changes in the example code and the
`start-routing.md` guide were missed in #34934, resulting in broken
instructions for the readers (see #40189).

This commit is essentially a follow-up to #34934, making the remaining
changes in the example code and the guide instructions.

Fixes #40189

PR Close #40197
2021-01-06 13:54:54 -08:00
George Kalpakas d08828339b docs: refactor code in `get-product` docregion of `getting-started` docs example (#40197)
This commit slightly refactors the code in the `get-product` docregion
of the `getting-started` docs example to make it easier to follow.

PR Close #40197
2021-01-06 13:54:54 -08:00
George Kalpakas 1d78d4d774 docs: clean up docregions in the `getting-started` docs example (#40197)
This commit does some minor clean-up in docregions of the
`getting-started` docs example. More specifically, it:
- Removes redundant docregion markers.
- Fixes whitespace inconsistencies.
- Adds `/* ... */` to indicate that there is more code before the end of
  a docregion (in order to avoid confusion).

PR Close #40197
2021-01-06 13:54:54 -08:00
George Kalpakas 1fae285e04 docs: more closely align the `getting-started-v0` and `getting-started` docs examples (#40197)
This commit aligns the code and style in the `getting-started-v0` docs
example with that of the `getting-started` example more closely (except
for the the parts that are intentionally different between the two).

PR Close #40197
2021-01-06 13:54:54 -08:00
Alexey Elin f846c093b1 docs: specify fallback generic font family (#40254)
https://developer.mozilla.org/en-US/docs/Web/CSS/font-family
"You should always include at least one generic family name in a font-family list,
 since there's no guarantee that any given font is available. This lets the browser
 select an acceptable fallback font when necessary."

PR Close #40254
2021-01-06 07:09:27 -08:00
George Kalpakas 5ba7bcd2a6 docs: fix `SpyDirective` in `lifecycle-hooks` docs example to use one ID per instance (#40208)
Previously, the `SpyDirective` in the `lifecycle-hooks` docs example
would use a different ID when logging `onInit` and when logging
`onDestroy` for the same instance, making it impossible to associate the
two calls. This was not helpful and came in constrast with how the
directive was described in the corresponding guide and shown in the
accompanying `spy-directive.gif` image.

This commit fixes the logic of the `SpyDirective` class to use the same
ID for all log operations of an instance.

Partially addresses #40193.

PR Close #40208
2020-12-21 14:22:15 -08:00
George Kalpakas e28d460307 docs: make the `spy-directive` docregion (in `lifecycle-hooks` example) easier to follow (#40208)
Previously, the docregion code referenced a `nextId` variable that was
not shown in the code, which was confusing for the reader.

This commit makes the declaration of the `nextId` variable part of the
docregion, so it is clear to the reader where it comes from and how it
is initialized.
This commit also removes the `logIt()` helper method, which didn't seem
to add value and calls `logger.log()` directly instead.

PR Close #40208
2020-12-21 14:22:15 -08:00
George Kalpakas 251b27701f docs: fix the order of links in `lifecycle-hooks` docs example (#40208)
This commit aligns the order of the links to the various sections of the
`lifecycle-hooks` docs example with the order in which the sections
appear in the template (which also coincides with the order in which
they are presented/discussed in the corresponding guide).

PR Close #40208
2020-12-21 14:22:15 -08:00