669 Commits

Author SHA1 Message Date
Kristiyan Kostadinov c92095c201 refactor(docs-infra): clean up entryComponents usages (#44257)
Cleans up some usages of `entryComponents` from AIO.

PR Close #44257
2021-11-30 13:49:46 -05:00
dario-piotrowicz d0dcea1258 docs(core): improve viewEncapsulation documentation (#44151)
Slighlty improve the `viewEncapsulation` documentation (both in code
comments and content files) to make it more clear and understandable.

See https://github.com/angular/angular/pull/44099#discussion_r745890903

PR Close #44151
2021-11-24 18:53:45 +00:00
fusho-takahashi 158ad09945 docs: Adding type annotation to ngOnInit() to make it consistent with the class structure produced by the CLI (#43579)
PR Close #43579
2021-11-16 14:09:52 -08:00
Ramesh Thiruchelvam 83d22847ee test: type spy objects in test example (#44170)
Example for test doesn't use typing for Jasmine Spy objects. Updated 
them with `SpyObj<T>` typing as in the Angular Documentation.

See https://angular.io/guide/testing-services

PR Close #44170
2021-11-16 09:38:43 -08:00
Pete Bacon Darwin 65fd656444 build(docs-infra): remove link to custom Stackblitz for running tests (#44085)
Previously there was a custom version of the testing app for Stackblitz that would run the tests in the browser.
With the web-container approach, this is no longer necessary since the tests can be run directly from the command line.

Fixes #44047

PR Close #44085
2021-11-08 18:12:17 +00:00
George Kalpakas 7e0c7cefe5 build(docs-infra): fix SystemJS-based docs examples (#43868)
Previously, the SystemJS-based docs examples (typically `ngUpgrade`
examples) were not compatible with Angular v13 (due to the removal of
UMD bundles from the published packages).

This commit makes the examples compatible with Angular v13 and
re-enables the tests for all SystemJS-based examples on CI.

PR Close #43868
2021-11-08 17:01:16 +00:00
Alan Agius 007a616a9e 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 c50abe57c8 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 3faef7180d 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:26 -07:00
George Kalpakas 12b7f4490f 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:26 -07:00
George Kalpakas 620a705065 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:26 -07:00
dirk diebel 59e56e79d0 docs(docs-infra): change deprecated keyboardEvent.keyCode example to use keyboardEvent.code (#43934)
PR Close #43934
2021-10-26 00:05:23 +00:00
Alan Agius 9968a8ad82 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 665466def3 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:55 +00:00
dario-piotrowicz b155bf71d0 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:11 +00:00
dario-piotrowicz 6b9045213d 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 bfb2b81556 docs: add missing declaration of CartComponent in tutorial (#43774)
PR Close #43774
2021-10-11 16:42:36 +00:00
dario-piotrowicz 1869474386 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:01 +00:00
markostanimirovic af11d3b721 docs: fix forms in template examples (#43772)
PR Close #43772
2021-10-08 20:39:13 +00:00
George Kalpakas d049a61f2a docs: use correct service name when creating error handler in http example (#43767)
PR Close #43767
2021-10-08 20:17:59 +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