Commit Graph

965 Commits

Author SHA1 Message Date
Dustin M. Eastway 544c26d779 docs: fix typescript errors for the schematics-for-libraries example (#30966)
PR Close #30966
2021-11-05 16:33:26 +00:00
Dustin M. Eastway 024fd9d9f0 docs: add cross-platform support to postbuild in schematics-for-libraries (#30966)
Use the cross-platform `copyfiles` package instead of using `cp` which fails on Windows machines when copying files in the `postbuild` script of the "schematics-for-libraries" example.

PR Close #30966
2021-11-05 16:33:26 +00:00
Alan Agius 2f62a9a548 docs: improve consuming partial-Ivy code outside the Angular CLI (#44027)
With this change we add an example of how to consume the linker plugin and also clean up the parts of this section.

Closes #44026

PR Close #44027
2021-11-04 18:55:52 +00:00
Andrew Kushnir 967283e8a1 docs: update dynamic component guide to use factory-less ViewContainerRef.createComponent (#43895)
PR Close #43895
2021-10-29 15:39:04 -07:00
George Kalpakas 7b35a3426f refactor(docs-infra): align docs examples with default CLI TS config (#43880)
This commit enable the `noImplicitOverride` and
`noPropertyAccessFromIndexSignature` TypeScript compiler options for
docs examples to better align with the default configuration of new
Angular CLI apps. It also makes the necessary changes to the docs
examples source code.

PR Close #43880
2021-10-29 13:10:25 -07:00
George Kalpakas 8286190930 build(docs-infra): update docs examples to Angular v13.0.0-rc.0 (#43880)
This commit updates the docs examples to Angular v13.0.0-rc.0. In
addition to updating the dependency versions, it also updates the
projects' structure and configs to more closely match what a new v13 CLI
app would look like. See, also, the [diff][1] between a basic v12.1.3
CLI app and a v13.0.0-rc.0 one.
(NOTE: v12.1.3 was the last version for which we aligned the projects
with how a new CLI app would look like.)

Additionlly:
- Since we now use RxJS v7 in docs examples, this commit removes the
  extra CI steps to explicitly test the docs examples against RxJS v7.
- Since Angular v13 no longer supports IE, this commit removes an
  IE-specific section from `upgrade-setup.md`.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/12.1.3..13.0.0-rc.0

PR Close #43880
2021-10-29 13:10:25 -07:00
George Kalpakas 0fc4e66f6e test(docs-infra): fix practical-observable-usage docs example tests with RxJS v7 (#43880)
Due to how `debounceTime()` works in RxJS v7, Jasmine's mock clock was
not enough to trigger it. This commit fixes it by providing a similar
mock clock that is able to mock all of `Date.now()`, `setInterval()` and
`setTimeout()`.

PR Close #43880
2021-10-29 13:10:25 -07:00
dirk diebel a91fe6db8c docs(docs-infra): change deprecated keyboardEvent.keyCode example to use keyboardEvent.code (#43934)
PR Close #43934
2021-10-26 00:05:22 +00:00
Alan Agius e48b49959d docs: remove fesm5 and esm5 deprecation notice. (#43915)
This has been removed in version 11 and should no longer be listed.

PR Close #43915
2021-10-25 17:54:52 +00:00
iRealNirmal c78f1cd34e docs: move deprecations example snippets to external file (#43700)
Moving angular depreciation examples to external project

closes #43337

PR Close #43700
2021-10-20 20:24:54 +00:00
dario-piotrowicz 68d18a0422 refactor(docs-infra): remove unnecessary tsconfig.json file (#43818)
the tsconfig.json file in aio/content/examples does not seem necessary
anymore as it was only used for tslinting and tslint has been removed
from the examples in PR #43592 and PR #43746

PR Close #43818
2021-10-13 16:51:10 +00:00
dario-piotrowicz 919d7dc233 refactor(docs-infra): remove tslint from cli systemjs examples (#43746)
remove the deprecated tslint from the examples of type systemjs

note: eslint hasn't be applied and linting has been removed entirely
to follow angular's unopinionated view on linting

PR Close #43746
2021-10-11 17:14:30 +00:00
Tanguy Nodet 8b2971417a docs: add missing declaration of CartComponent in tutorial (#43774)
PR Close #43774
2021-10-11 16:42:34 +00:00
dario-piotrowicz acf3102369 refactor(docs-infra): remove linting from i18n example angular.json (#43747)
remove linting from the i18n angular.json example as that is no longer
present in the boilerplace angular.json (and the two should be kept in
sync)

note: the linting was removed from the boilerplate angular.json file in PR #43592

PR Close #43747
2021-10-08 20:42:00 +00:00
markostanimirovic 018af62141 docs: fix forms in template examples (#43772)
PR Close #43772
2021-10-08 20:39:11 +00:00
George Kalpakas 7555e9fb8a docs: use correct service name when creating error handler in http example (#43767)
PR Close #43767
2021-10-08 20:17:58 +00:00
JoostK 06732606c9 docs: remove legacy compiler options in library schematics example (#43224)
The `skipTemplateCodegen`, `strictMetadataEmit` and
`enableResourceInlining` options are specific to ViewEngine and have no
effect when using the Ivy compiler. Since libraries can no longer be
compiled using ViewEngine from Angular 13, this commit removes these
options entirely.

The `annotateForClosureCompiler` is also no longer recommended to use,
as Closure Compiler is not supported outside of Bazel.

Finally, the `fullTemplateTypeCheck` flag is changed into
`strictTemplates` as the former flag is being deprecated. Enabling
`strictTemplates` does result in more strict type-checking than with
only `fullTemplateTypeCheck` enabled, but simply removing
`fullTemplateTypeCheck` right away would result in less strict
type-checking which is not desired.

PR Close #43224
2021-10-04 16:32:11 -07:00
dario-piotrowicz d2f3f2cad6 refactor(docs-infra): remove tslint from cli examples (#43592)
remove the deprecated tslint from the examples of type cli

note: eslint hasn't be applied and linting has been removed entirely
to follow angular's unopinionated view on linting

PR Close #43592
2021-10-04 16:30:48 -07:00
iRealNirmal e5c3017df3 docs: move angular-compiler-options tsconfig snippets to external file (#43545)
Moving angular-compiler-options docs inline code to external file of tsconfig.json and tsconfig.app.json.

closes #43336

PR Close #43545
2021-10-04 10:55:04 -07:00
Andrew Scott d04b550f2e docs: Deprecate longhand binding prefixes (#43671)
DEPRECATION:

The template prefixes `bind-`, `on-`, `bindon-`, and `ref-` have been deprecated
in v13. Templates should use the more widely documented syntaxes for binding and references:

* `[input]="value"` instead of `bind-input="value"`
* `[@trigger]="value"` instead of `bind-animate-trigger="value"`
* `(click)="onClick()"` instead of `on-click="onClick()"`
* `[(ngModel)]="value"` instead of `bindon-ngModel="value"`
* `#templateRef` instead of `ref-templateRef`

PR Close #43671
2021-10-04 10:27:06 -07:00
Paul Gschwendtner 77cb17166e test(docs-infra): update http test to use correct charset name due to chromium update (#43431)
We updated the dev-infra version as part of the v13 package format
in order to be able to use the latest `rollup` version (and its
plugins). The update of the shared dev-infra package resulted in an
update of Chromium to a more recent version. This version of Chromium
seems to normalize the `content-type` header differently, so that the
AIO `http` example test assertion needs to be updated to work with the
new version of chromium. This commits updates the test.

PR Close #43431
2021-10-01 18:28:46 +00:00
little-pinecone 7cd87ea4c4 docs: add button type in form array example (#43666)
add a button type in the example of creating a dynamic form so that the button that adds the alias control does not submit the entire form

PR Close #43666
2021-10-01 12:23:09 -04:00
xiaohanxu-nick 544cb43eed docs: fix missing step in get started example (#43646)
PR Close #43646
2021-10-01 08:45:59 -07:00
dario-piotrowicz 6e7454df86 docs(animations): improve the aio animations introduction (#42885)
improve slightly the angular.io animation introduction guide, such
improvement are styling, information and clarity related

PR Close #42885
2021-10-01 08:34:19 -07:00
Andrew Scott 09d325a9e6 test(router): refactor tests to not use deprecated loadChildren (#43578)
Many of the tests in the router code use the deprecated loadChildren as a string. This
has been deprecated for years and can easily be changed to just a function that
returns the module.

PR Close #43578
2021-09-29 11:14:07 -07:00
Chris 9c2b8c2902 docs: clarify description of :host and :host-context selectors (#41332)
Fixes #39466

PR Close #41332
2021-09-29 10:00:05 -07:00
Ricardo Chavarria de662da8e2 docs: Add Ricardo Chavarria to GDE resources (#43571)
update size image
update preview
docs: replace an avatar with smaller size
Change order


PR Close #43571
2021-09-27 14:25:56 -07:00
dario-piotrowicz a1633c1c6e docs(service-worker): improve service worker guides (#43508)
improve slightly the angular.io guides related to service workers, by
means of fixes, styling, information and clarity changes

PR Close #43508
2021-09-22 17:48:39 +00:00
Xiaohanxu1996 6e5f59fe61 docs: remove duplicate import from @angular/core (#43530)
PR Close #43530
2021-09-22 16:16:05 +00:00
Pete Bacon Darwin 7efa47075c docs: remove http example dependency on 3rd party service (#43475)
Previously the `http` example did accessed the npmsearch.com website to demonstrate response caching.
But if this service became unavailable then the example (and its e2e tests) would fail.

This commit changes the example to use the in-memory-web-api for this lookup, which will not be affected by 3rd party outages.

The guide that references this example has been updated to avoid references to the original npm search service.

PR Close #43475
2021-09-16 15:59:05 +00:00
Pete Bacon Darwin 1986407ab5 docs: move i18n angular.json snippets to external file (#43216)
Note that because `angular.json` is a "boilerplate" file we cannot
just add comments to the one that is actually used in the application.

Instead this commit makes a copy, which is annotated with docregions.
To ensure that this file is not ignored by the example-collector, we had to
update the `.gitignore` to not ignore this file. (This also allows the file to be
easily stored tracked in git).

PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin c464bb4555 docs: move duplicate custom id snippets to external examples (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin 04e41b8c35 docs: move nginx and apache config blocks to external files (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin c0988d6f52 docs: move plural function example to external file (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin 602a127d08 docs: move global locale import to external example file (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
Pete Bacon Darwin eb0c1475ab docs: move shell snippets to external example files (#43216)
PR Close #43216
2021-09-15 10:46:45 -07:00
dario-piotrowicz df177d9176 docs: amend code related to string-expressions for property binding (#43366)
resolves #43287

PR Close #43366
2021-09-10 09:22:14 -07:00
dario-piotrowicz 9d789b8d9f docs: fix app-hero-detaill typo (#43349)
PR Close #43349
2021-09-07 21:25:03 +00:00
Enea Jahollari c7a93e632b docs: enhance spacings in dynamic component loader section examples (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Enea Jahollari 48c7529d3d docs: enhance spacings in content projection section examples (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Enea Jahollari 50c522bd90 docs: enhance spacings in inputs outputs section examples (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Enea Jahollari 3610002d36 docs: enhance spacings in component interaction section examples (#43241)
PR Close #43241
2021-09-02 16:45:09 +00:00
Enea Jahollari 672777c7e0 docs: enhance spacings in component lifecycle section examples (#43241)
PR Close #43241
2021-09-02 16:45:08 +00:00
Enea Jahollari 1952bf0961 docs: enhance spacings in component overview section examples (#43241)
PR Close #43241
2021-09-02 16:45:08 +00:00
Enea Jahollari 9f4cbac612 docs: enhance spacings in try it section examples (#43241)
PR Close #43241
2021-09-02 16:45:08 +00:00
Enea Jahollari 316b19cf33 docs: enhance what is angular section spacing (#43241)
PR Close #43241
2021-09-02 16:45:08 +00:00
George Kalpakas dcfabf08af docs: add step to declare ProductAlertsComponent in tutorial (#43229)
The getting-started tutorial at angular.io/start instructs users to
generate a `ProductAlertsComponent` using the "Angular generator"
feature in [StackBlitz](https://stackblitz.com/). However, unlike the
Angular CLI, generating a component in StackBlitz does not automatically
declare it in `AppModule`, which is a requirement for the component to
be used in the application. This resulted in a compile error when
following the tutorial instructions.

This commit fixes this by adding a step to manually import and declare
the newly generated component in `app.module.ts`.

Fixes #43020
Closes #43212

PR Close #43229
2021-08-30 13:37:45 -07:00
dario-piotrowicz 27fdd52fb9 refactor(common): fix emiting typos (#43221)
fix some of the aio examples which log strings containing "emiting" instead of "emitting"

PR Close #43221
2021-08-23 13:30:29 -07:00
George Kalpakas 93590895b5 build(docs-infra): update docs examples to Angular v12.1.3 (#42949)
This commit updates the docs examples to Angular v12.1.3. In addition to
updating the dependencies versions, it also updates the projects'
structure and configs to more closely match what a new v12 CLI app would
look like. See, also, the [diff][1] between a basic v11.2.11 CLI app and
a v12.1.3 one.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.2.11..12.1.3

PR Close #42949
2021-08-09 09:41:00 -07:00
Fabien BERNARD 644f1b3924 docs: fix interval type in the example (#43042)
`window.setInterval` returns a `number`, let's fix this example.

PR Close #43042
2021-08-05 15:33:13 -07:00