Commit graph

5480 commits

Author SHA1 Message Date
George Kalpakas
9f558003c4 docs(service-worker): fix alert closing tag (#45797)
This also allows correctly parsing other tags further below (such as
the `@reviewed` tag at the end).

PR Close #45797
2022-05-03 09:27:36 -07:00
dario-piotrowicz
9a04ded85b docs(docs-infra): improve clarity of toh-pt2 click code snippet (#45829)
make clearer that the click code snippet present in the tour of heroes
part 2 guide is not complete but adding ellipsis at the end of the
snippet and also by slightly tweaking the text introducing the snippet

resolves #45758

PR Close #45829
2022-05-02 11:42:12 -07:00
dario-piotrowicz
83159749a2 fix(docs-infra): fix wrong heading structure in aio resources page (#45822)
in the aio resources page there is a main h1 heading and then the next
headings used are h3 and h4, thus h2 is being skipped, change such
headings so that there is no heading skipping (which is a bad practice
and can result to confusing experiences from screen reader users)

PR Close #45822
2022-05-02 09:20:36 -07:00
Paul Gschwendtner
3a60063a54 build: updates to account for github primary branch rename
This is the commit accounting for the Github primary branch
rename when we actually perform the update.

We have three change phases: Prepare, Direct, Cleanup. This commit
is for the `direct` phase.
2022-04-28 11:17:01 -06:00
Renovate Bot
0840ece9e2 build: lock file maintenance (#45751)
PR Close #45751
2022-04-28 09:39:06 -07:00
George Kalpakas
14c4979a51 build(docs-infra): upgrade cli command docs sources to f258be5be (#45795)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](5bd17a256...f258be5be):

**Modified**
- help/generate.json

PR Close #45795
2022-04-28 09:34:31 -07:00
dario-piotrowicz
7d8998cc4f docs: empty alt of aio home decorative images (#45740)
in the aio home page the sections' decorative images provide an alt
texts, which shouldn't actually be present
(see: https://www.w3.org/WAI/tutorials/images/decorative/), empty such
alt text for a better user experience

PR Close #45740
2022-04-27 09:06:12 -07:00
dario-piotrowicz
a895da6907 docs: use proper sections in aio home (#45740)
convert the `div` groups in the aio home page
to proper `section`s with a valid heading/title

PR Close #45740
2022-04-27 09:06:12 -07:00
dario-piotrowicz
d1a9fd5cc1 docs: make sure aio home has a non-ignored h1 (#45740)
currently the aio home page presents a single h1 which is ignored by
assistive technologies since it has its display set none, so replace it
with a new h1 containing the main text of the page instead

PR Close #45740
2022-04-27 09:06:12 -07:00
dario-piotrowicz
f282ca4f62 fix(docs-infra): fix alert child margin issue (#45761)
replace the generic `*` selector used in the alert styling with
`p` (which is what gets generated from the markdown) as the styling adds
margins which are not always wanted

PR Close #45761
2022-04-27 09:04:30 -07:00
George Kalpakas
71f64f2875 docs(upgrade): move import back into docregion in rollup-config.js (#45778)
This was accidentally broken in #45405.

PR Close #45778
2022-04-27 09:04:09 -07:00
Paul Gschwendtner
f1cc4a6c6f build: update tsec and drop corresponding postinstall patch (#45767)
Updates tsec and drops the corresponding postinstall patch that
we added when we updated to Bazel v5. See:

https://github.com/google/tsec/pull/25

PR Close #45767
2022-04-26 11:48:34 -07:00
Andrew Scott
4962a4a332 feat(router): Allow loadChildren to return a Route array (#45700)
This commit expands the `LoadChildrenCallback` to accept returning `Routes`
in addition to the existing `NgModule` type. In addition, it adds a
check to ensure these loaded routes all use standalone components.
The components must be standalone because if they were not,
we would not have the required `NgModule` which the component is declared in.

Existing API:
```
{path: 'lazy/route', loadChildren: import('./lazy').then(m => m.LazyModule)}

@NgModule({
  imports: [
    ExtraCmpModule,
    RouterModule.forChild([
      {path: 'extra/route', component: ExtraCmp},
    ]),
  ],
})
export class LazyModule {}
```

The new API for lazy loading route configs with standalone components
(no NgModule) is to expand `loadChildren` to allow returning simply a `Routes` array.

```
// parent.ts
{
  path: 'parent',
  loadChildren: () => import('./children').then(m => m.ROUTES),
}

// children.ts
export const ROUTES: Route[] = [
  {path: 'child', component: ChildCmp},
];
```

Note that this includes minimal documentation updates. We need to
include a holistic update to the documentation for standalone components
in the future that includes this feature.

PR Close #45700
2022-04-22 09:25:20 -07:00
Paul Gschwendtner
067e4c26be build: update systemjs aio boilerplate to work with APF v13+ exports field (#45405)
The SystemJS examples were using an outdated version of rollup that did
not support export fields. Now with the recent changes where we removed
secondary package.json files, the rather old/somewhat outdated SystemJS
examples failed bundling since exports were not considered.

PR Close #45405
2022-04-21 11:09:39 -07:00
George Kalpakas
3dee3d107b fix(docs-infra): fix placement of "Edit source" button on errors and diagnostics pages (#45634)
This commit aligns the layout of errors and extended diagnostics pages
more closely with other docs pages to ensure that the "Edit source"
button is displayed correctly even when the heading is too long to fit
on a single line. For error pages, in particular, this ensures that the
button is not obscured by the error video.

**Before:**
![error-pages before][1]

**After:**
![error-pages after][2]

[1]: https://user-images.githubusercontent.com/8604205/163408291-7aebd029-891c-4045-8fa2-a8e2b2b06dab.png
[2]: https://user-images.githubusercontent.com/8604205/163408296-40e6df8e-aadc-4a82-978a-ab4d902b6f6e.png

PR Close #45634
2022-04-21 11:07:27 -07:00
Andrew Kushnir
9292953c56 fix(docs-infra): include tslib into SystemJS config in upgrade-module example app (#45706)
This commit updates the SystemJS for one of the example apps (the `upgrade-module` one) to include a resolution rule for the `tslib`. This is needed in case `tslib` is referenced from the framework code (for example in case of downleveling of some operators). This makes it consistent with other example app configs.

PR Close #45706
2022-04-21 11:05:37 -07:00
dario-piotrowicz
dea8c86cd5 feat(router): add ariaCurrentWhenActive input to RouterLinkActive directive (#45167)
add the ariaCurrentWhenActive input to the RouterLinkActive directive so that
users can easily set the aria-current property to their active router
links

resolves #35051

PR Close #45167
2022-04-20 15:14:01 -07:00
Andrew Scott
1d2f5c1101 refactor(router): deprecate no longer needed resolver fields (#45597)
DEPRECATED:

The `resolver` argument of the `RouterOutletContract.activateWith` function and the `resolver` field of the `OutletContext` class are deprecated. Passing component factory resolvers are no longer needed. The `ComponentFactoryResolver`-related symbols were deprecated in `@angular/core` package since v13.

PR Close #45597
2022-04-20 12:57:37 -07:00
Andrew Kushnir
788f587367 fix(docs-infra): avoid internal symbols from being referenced during auto-linking (#45689)
This commit adds extra logic to avoid internal and privately exported symbols from being referenced during auto-linking. Currently such symbols can be used for linking, thus resulting in a non-existing link and causing the linking process to fail.

PR Close #45689
2022-04-20 09:11:22 -07:00
Mangalraj
4ad7c2e4df docs: Update aio/content/guide/setup-local.md (#45644)
Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>
PR Close #45644
2022-04-19 20:20:39 -07:00
Mangalraj
89f9d28097 docs: correct the example command to install angular (#45644)
PR Close #45644
2022-04-19 20:20:39 -07:00
Saurabh Kamble
5d155950e3 Fix typo (#45680)
PR Close #45680
2022-04-19 09:26:12 -07:00
George Kalpakas
ceffdeda69 docs(common): fix links to locales in i18n guides (#45661)
In PR #42230, the locale file generation process was modified so that
generated locale files are no longer checked into the repository. Update
a few links in the docs that pointed to the previously checked in files
to point to other places where the files exist.

PR Close #45661
2022-04-19 09:17:33 -07:00
Louis Gombert
f5299a3b8f docs: update decorators proposal stage and link in glossary (#45669)
PR Close #45669
2022-04-19 09:14:36 -07:00
Marko Kaznovac
ec5cb0bb54 docs: use language agnostic mdn urls (#45666)
PR Close #45666
2022-04-18 14:10:16 -07:00
Marko Kaznovac
3477364852 docs: fix mdn links (#45666)
PR Close #45666
2022-04-18 14:10:16 -07:00
Alex Rickabaugh
d5a6cd1111 feat(core): implement EnvironmentInjector with adapter to NgModuleRef (#45626)
This commit exposes a new `EnvironmentInjector` abstraction, which
generalizes the "module injector" concept to injectors that are not based on
NgModules.

An EnvironmentInjector is a conceptual analogue of an `NgModuleRef` - it
represents an injector on the former "module" DI hierarchy in Angular (now
renamed to the "environment injector hierarchy"). Environment injectors are
created via the `createEnvironmentInjector` function from a list of
`Provider`s.

For backwards compatibility with current code using `NgModuleRef`,
`EnvironmentInjector`s are wrapped by an adapter `NgModuleRef`
implementation, so injecting `NgModuleRef` always returns the latest
`EnvironmentInjector`, even if that injector was not based on an NgModule.
Conversely, NgModule-based `NgModuleRef`s created via `createNgModuleRef`
are _also_ `EnvironmentInjector`s.

PR Close #45626
2022-04-18 09:28:42 -07:00
Renovate Bot
68357104c9 build: lock file maintenance (#45457)
PR Close #45457
2022-04-15 14:38:16 -07:00
dario-piotrowicz
0b6407241c fix(docs-infra): fix aio search-results issue with toolbar and notification (#45579)
use border-top-width instead of padding-top as the strategy for moving
the search-results panel down, this fixes the issue of the panel going
behind the toolbar (which causes either overlapping text in the home
page or the results scrollbar to be hidden behind the toolbar in other
pages)

PR Close #45579
2022-04-15 14:22:14 -07:00
dario-piotrowicz
9e69579440 fix(docs-infra): amend notification close button aria-label (#45579)
move the aria-label used inside the close-button to the button itself
(since otherwise the button's aria-label overrides the childs)

PR Close #45579
2022-04-15 14:22:14 -07:00
dario-piotrowicz
d2436bfc91 feat(docs-infra): add close button to search-results aio panel (#45579)
add a close button to the search-results aio panel so that the user can
conveniently close it via keyboard

this complements the focus trap implemented in PR #44989
(more here: https://github.com/angular/angular/pull/44989#issuecomment-1037287678)

PR Close #45579
2022-04-15 14:22:13 -07:00
Ilya Marchik
b5b0a50294 docs: fix typo (#45637)
Replace wrong mention of 'heroService.delete()' with 'heroService.deleteHero()' because 'heroService.delete()' doesn't exist and 'heroService.deleteHero()' should be mentioned instead

Resolves #45636

PR Close #45637
2022-04-14 16:30:03 -07:00
George Kalpakas
2f08b8043e build(docs-infra): upgrade cli command docs sources to 5bd17a256 (#45630)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](0e8f3c34b...5bd17a256):

**Added**
- help/completion.json

PR Close #45630
2022-04-14 15:00:40 -07:00
George Kalpakas
94fba9b047 docs(core): fix typo in View Encapsulation code example (#45629)
Fix closing tag name to match opening one (`</hero-detail>` -->
`<hero-details>`).

PR Close #45629
2022-04-14 15:00:04 -07:00
Andrew Scott
47e7a2850b refactor(router): Add warning for relativeLinkResolution: 'legacy' (#45523)
This change adds code to compute the corrected value for a link,
regardless of the `relativeLinkResolution` value. Then, if the
`relativeLinkResolution` is set to `legacy` and differs from the correct
value, a warning is printed to the console in dev mode.

This change is meant to assist in notifying developers that they have
code which relies on the deprecated, broken behavior so they can fix and
update the code before the `relativeLinkResolution` option is fully
removed.

PR Close #45523
2022-04-13 17:19:08 +00:00
Renovate Bot
7bf1cf4bf5 build: update all non-major dependencies (#45493)
PR Close #45493
2022-04-13 15:33:33 +00:00
4javier
a6ab3f7beb docs: fix grammar (#45455)
PR Close #45455
2022-04-12 23:55:32 +00:00
4javier
9e86a3134e docs: fix to comply with new codeblock guidelines (#45455)
PR Close #45455
2022-04-12 23:55:32 +00:00
4javier
062fa76707 docs: modified as per dylhunn suggestions (#45455)
https://github.com/angular/angular/pull/45455#pullrequestreview-925369970
PR Close #45455
2022-04-12 23:55:32 +00:00
4javier
b9e7983606 docs: update template reference variables (#45455)
- Specify `NgForm` gets applied by default on `<form>` elements before the long example using it
- Move the strange (and questioned in a commented line) snippet about undefined ref vars in a standalone paragraph and clarify its meanings (adding the part about directive just because there was something similar already there)
- Extend and modify `*ngFor` example, since in the original that was misleading to think reference variable couldn't be used inside a loop
- Remove two lines stating that with `*ngIf` and `*ngFor` the framework cannot know if a template is ever instantiated (can't see how this relate with the page)
- Add an explanation of assignment of default `$implicit` value to undefined input variables
- Modify template example for template input variable to be a complete ngForOf loop instead of the original poor intelligible truncated one
- Replace last generic statements about variable namespaces with a more pragmatic and explanatory one concerning the resolution in case of homonymy

PR Close #45455
2022-04-12 23:55:32 +00:00
Andrew Kushnir
9add714b13 refactor(core): remove deprecated aotSummaries fields in TestBed config (#45487)
BREAKING CHANGE:

Since Ivy, TestBed doesn't use AOT summaries. The `aotSummaries` fields in TestBed APIs were present, but unused. The fields were deprecated in previous major version and in v14 those fields are removed. The `aotSummaries` fields were completely unused, so you can just drop them from the TestBed APIs usage.

PR Close #45487
2022-04-12 23:29:38 +00:00
Jason Hendee
3c1695e399 docs: make tutorial instructions consistent (#45372)
When starting this tutorial, it's not clear to the user whether they should add routing right away, Etc. The other tutorials within the routing section do a better job of this.

Also.. the suggested name of this sample app clashes with that of a previous tutorial, forcing the user to either delete the previous tutorial files, choose a different name for this tutorial's app, or place this app in a different parent directory.
 Conflicts:
	aio/content/guide/router-tutorial-toh.md

PR Close #45372
2022-04-12 22:27:37 +00:00
Virginia Dooley
83920af7cd docs: new Pipes custom data doc (#45505)
PR Close #45505
2022-04-12 21:29:06 +00:00
Virginia Dooley
0d6325b53c docs: pipes custom data transform (#45505)
PR Close #45505
2022-04-12 21:29:06 +00:00
4javier
ee3cfc8815 docs: fix path typo (#45604)
PR Close #45604
2022-04-12 21:27:49 +00:00
4javier
0528b47728 docs: fix final code review section codetabs path (#45604)
Fix paths for codetabs in final review section messed up by this commit 42289f25c6
They were all pointing to `heroes-search.component`
PR Close #45604
2022-04-12 21:27:49 +00:00
Michael-Doner
79de026a20 docs: add powershell execution policies note (#45576)
Fixes #44598

PR Close #45576
2022-04-12 21:13:59 +00:00
George Kalpakas
eb2f4492eb docs(docs-infra): add missing period in aio/README.md (#45584)
PR Close #45584
2022-04-12 18:40:46 +00:00
Leosvel Pérez Espinosa
222d8662a2 docs: fix schematicCollections option (#45602)
PR Close #45602
2022-04-12 18:40:08 +00:00
Dylan Hunn
89d299105a feat(forms): Implement strict types for the Angular Forms package. (#43834)
This PR strongly types the forms package by adding generics to AbstractControl classes as well as FormBuilder. This makes forms type-safe and null-safe, for both controls and values.

The design uses a "control-types" approach. In other words, the type parameter on FormGroup is an object containing controls, and the type parameter on FormArray is an array of controls.

Special thanks to Alex Rickabaugh and Andrew Kushnir for co-design & implementation, to Sonu Kapoor and Netanel Basal for illustrative prior art, and to Cédric Exbrayat for extensive testing and validation.

BREAKING CHANGE: Forms classes accept a generic.

Forms model classes now accept a generic type parameter. Untyped versions of these classes are available to opt-out of the new, stricter behavior.

PR Close #43834
2022-04-12 17:37:04 +00:00