Commit Graph

5634 Commits

Author SHA1 Message Date
renovate[bot] 2303ecfc5d build: update dependency karma-jasmine-html-reporter to v2 (#46578)
PR Close #46578
2022-06-29 10:12:25 -07:00
renovate[bot] d429eca654 build: update dependency jsdom to v20 (#46576)
PR Close #46576
2022-06-29 10:11:31 -07:00
renovate[bot] 47c65ace5e build: update eslint dependencies (#46593)
PR Close #46593
2022-06-29 10:10:50 -07:00
renovate[bot] a33d4ee41a build: update dependency http-server to v14 (#46572)
PR Close #46572
2022-06-29 10:08:53 -07:00
renovate[bot] 2758a30a34 build: update dependency @rollup/plugin-commonjs to v22 (#46556)
PR Close #46556
2022-06-29 10:08:29 -07:00
Andrew Scott 7dea2892c0 docs: fix breaking change note in v14 (#46603)
The breaking change note for one change was truncated

PR Close #46603
2022-06-29 10:07:43 -07:00
Chad Ramos 528ff13f61 docs: Grammer update (#46567)
Missing `in`.
PR Close #46567
2022-06-28 21:40:20 -07:00
Bezael 07d12055e6 docs: add bezael to GDE resources (#46412)
PR Close #46412
2022-06-28 13:02:25 -07:00
Dylan Hunn f6a096e3d4 fix(forms): Update a Forms validator error to use RuntimeError (#46537)
Replace `new Error()` in a forms Validators function with `RuntimeError`, for better tree-shakability. Also, improve the error messages, and add documentation.

PR Close #46537
2022-06-28 11:32:54 -07:00
Jessica Janiuk f86e0948f8 fix(core): Updates error to use RuntimeError code (#46526)
This updates the iterable differ error to use more up-to-date error
codes.

PR Close #46526
2022-06-28 00:29:54 -07:00
Alan Agius 21cce3a82b docs: add how to pass array options to the CLI (#46505)
With this change we add an example on how to use array options in the CLI.

Closes #33851

PR Close #46505
2022-06-27 10:56:30 -07:00
Alan Agius d5717612a5 docs: update CLI command-language syntax (#46505)
Remove reference to camel case options and arguments as this is no longer valid in version 14.

Also, wrap required arguments with `<>` as this is correct syntax to differentiate between optional and required args.

PR Close #46505
2022-06-27 10:56:29 -07:00
George Kalpakas 09ceb4ea64 fix(docs-infra): correctly populate "Description" column in CLI command overview (#46502)
Previously, the "Description" column of the CLI command overview section
was populated based on the CLI command docs' `description` property.
Since #45225, the short description of CLI commands is stored in the
`shortDescription` property.

This commit restores the content of the "Description" column by using
the correct property to populate it.

Fixes #46489

PR Close #46502
2022-06-27 10:50:32 -07:00
dario-piotrowicz f659dc8e53 fix(docs-infra): change color of code copy button (#46460)
change the color of the code copy button so that it has a better color
contrast with its background

resolves #37817

PR Close #46460
2022-06-27 09:06:39 -07:00
dario-piotrowicz 599870f121 refactor(docs-infra): create external-link-with-icon mixin (#46482)
create external-link-with-icon mixin in order to reduce scss code
duplication

PR Close #46482
2022-06-24 15:28:01 -07:00
dario-piotrowicz 7558c558e0 feat(docs-infra): redesign contributors page (#46347)
redesign the aio contributors page so that it displays the contributors
details as a list instead of using flipping cards, this should improve
the usability of the page and especially its accessibility

resolves #44346

PR Close #46347
2022-06-24 13:11:56 -07:00
Paul Gschwendtner d248d83c17 build: convert release package build scripts to typescript (#46456)
Follow-up to: cce395a928.

PR Close #46456
2022-06-22 14:35:31 -07:00
Aristeidis Bampakos fac6944ff7 docs: fix typos in several guides (#46453)
PR Close #46453
2022-06-22 09:14:53 -07:00
Dany Paredes 2512f65e51 docs: add dany paredes to GDE resources (#46411)
PR Close #46411
2022-06-21 14:21:29 -07:00
dario-piotrowicz db5d2683c8 fix(docs-infra): slightly improve aio-top-menu css (#46429)
slightly improve the aio-top-menu css by making it more robust
regarding differnt font-sizes and also remove unnecessary css rules

PR Close #46429
2022-06-21 12:19:12 -07:00
web-dave 96c70741ab docs: update ng-de date (#46446)
PR Close #46446
2022-06-21 11:49:09 -07:00
Paul Gschwendtner 3b077c05c4 build: update dev-infra package to latest version with full ESM (#46437)
Updates `angular/dev-infra` to the latest version which is now full ESM.

PR Close #46437
2022-06-21 11:48:03 -07:00
behrooz bozorg chami 1aa27ebbad docs: fix base href haser tag (#46431)
I add '>' end of header tag
Fixes #46430

PR Close #46431
2022-06-21 11:47:04 -07:00
markostanimirovic cdd19bd30e docs(core): add full example for IfLoadedDirective (#46425)
This commit adds a full example for the IfLoadedDirective and moves
the code to the StackBlitz playground for structural directives.

Fixes #40739, #37119

PR Close #46425
2022-06-21 11:46:26 -07:00
dario-piotrowicz 88f53dcdbc feat(docs-infra): add open_in_new icon to external nav-item links (#46384)
add a mat open_in_new icon to the blog external link present in the
left sidenav on smaller screens so that it can be distinguished from
the other (/internal) links

this is a continuation of #45876

PR Close #46384
2022-06-21 11:45:57 -07:00
4javier d1e5ef51b6 docs: fix link to unpkged locales (#46379)
Add trailing slash to url
PR Close #46379
2022-06-15 14:05:14 -07:00
Aakash 2509d7681b docs: Add missing line in *zone-flags.ts* file for event-binding wiki. (#46369)
PR Close #46369
2022-06-15 14:04:43 -07:00
dario-piotrowicz ba4f3aabee docs: add standalone details to NG0302 (#46090)
improve the error information of NG0302 by including details about
standalone pipes (and components)

PR Close #46090
2022-06-15 14:04:14 -07:00
dario-piotrowicz 463feb6a58 feat(docs-infra): add open_in_new icon to external aio-top-menu links (#45876)
add an open_in_new icon to the blog external link present in the
aio-top-menu so that it can be distinguished from the other (/internal)
links

resolves #38412

PR Close #45876
2022-06-15 14:03:29 -07:00
markostanimirovic 7a376466b3 feat(docs-infra): show dark scrollbars in dark mode (#46363)
With this commit, dark scrollbars will be shown when angular.io is in dark mode.

PR Close #46363
2022-06-15 15:56:38 +00:00
piyush132000 9ce733aacb docs: fix code style (#45527)
I have removed unnecessary code from the components & i initialize the
form in OnInit function (life cycle). I think initilization of forms and
getting data from service must be done inside ngOnInit.

PR Close #45527
2022-06-14 19:56:49 +00:00
Badawi7 1278d2af6a docs: fix multicast observable example output (#46127)
Fix the order of logs that represent the output of the multicasting example, as the correct behavior is that all observers are notified of the final value before any of them is notified about completion.
PR Close #46127
2022-06-14 17:04:12 +00:00
vivekkoya 86303f73c9 docs(core): fix broken link <BLANK LINE> Dead link is updated with new, working, and updated link. (#46359)
PR Close #46359
2022-06-14 15:55:19 +00:00
Andrew Scott de058bba99 feat(router): Add CanMatch guard to control whether a Route should match (#46021)
Currently we have two main types of guards:
`CanLoad`: decides if we can load a module (used with lazy loading)
`CanActivate` and friends. It decides if we can activate/deactivate a route.
So we always decide where we want to navigate first ("recognize") and create a new router state snapshot. And only then we run guards to check if the navigation should be allowed.
This doesn't handle one very important use case where we want to decide where to navigate based on some data (e.g., who the user is).
I suggest to add a new guard that allows us to do that.

```
[
  {path: 'home', component: AdminHomePage, canUse: [IsAdmin]},
  {path: 'home', component: SimpleHomePage}
]
```

Here, navigating to '/home' will render `AdminHomePage` if the user is an admin and will render 'SimpleHomePage' otherwise. Note that the url will remain '/home'.

With the introduction of standalone components and new features in the Router such as `loadComponent`,
there's a case for deprecating `CanLoad` and replacing it with the `CanMatch` guard. There are a few reasons for this:

* One of the intentions of having separate providers on a Route is that lazy
loading should not be an architectural feature of an application. It's an
optimization you do for code size. That is, there should not be an architectural
feature in the router to specifically control whether to lazy load something or
not based on conditions such as authentication. This is a slight nuanced
difference between the proposed canUse guard: this guard would control whether
you can use the route at all and as a side-effect, whether we download the code.
`CanLoad` only specified whether the code should be downloaded so canUse is more powerful and more appropriate.
* The naming of `CanLoad` will be potentially misunderstood for the `loadComponent` feature.
Because it applies to `loadChildren`, it feels reasonable to think that it will
also apply to `loadComponent`. This isn’t the case: since we don't need
to load the component until right before activation, we defer the
loading until all guards/resolvers have run.

When considering the removal of `CanLoad` and replacing it with `CanMatch`, this
does inform another decision that needed to be made: whether it makes sense for
`CanMatch` guards to return a UrlTree or if they should be restricted to just boolean.
The original thought was that no, these new guards should not allow returning UrlTree
because that significantly expands the intent of the feature from simply
“can I use the route” to “can I use this route, and if not, should I redirect?”
I now believe it should allowed to return `UrlTree` for several reasons:

* For feature parity with `CanLoad`
* Because whether we allow it as a return value or not, developers will still be
able to trigger a redirect from the guards using the `Router.navigate` function.
* Inevitably, there will be developers who disagree with the philosophical decision
to disallow `UrlTree` and we don’t necessarily have a compelling reason to refuse this as a feature.

Relates to #16211 - `CanMatch` instead of `CanActivate` would prevent
blank screen. Additional work is required to close this issue. This can
be accomplished by making the initial navigation result trackable (including
the redirects).
Resolves #14515
Replaces #16416
Resolves #34231
Resolves #17145
Resolves #12088

PR Close #46021
2022-06-13 22:53:49 +00:00
Daniel Schmitz 9ab32616aa docs: Adding a book "Angular from Scratch" (#46352)
Adding a book "Angular from Scratch" in the resources file
PR Close #46352
2022-06-13 20:59:02 +00:00
Kevin Davila 71b6b9e48b docs: Add kevindaviladev to contributors (#46330)
PR Close #46330
2022-06-10 17:58:50 +00:00
Tom Eustace adb21a2416 docs: add angular#bundler to Enforcing Trusted Types section (#45450)
When a Content Security Policy is defined that uses trusted-types in an application that uses lazy chunk files, ng
serve will be broken as angular#bundler entry needs to be added to
Content Security Policy.

Fixes #44647

PR Close #45450
2022-06-10 16:11:41 +00:00
alefra 55a0efede2 docs: modify header and path (#45828)
Change header and path to match with file in the example folder

PR Close #45828
2022-06-10 16:11:09 +00:00
alefra da8ea7dfaa docs: modify import (#45828)
Modify import after moving Component and Directives

PR Close #45828
2022-06-10 16:11:09 +00:00
alefra eafe9886b8 docs: move ZippyToggleDirective (#45828)
Move ZippyToggleDirective from app.component.ts

PR Close #45828
2022-06-10 16:11:09 +00:00
alefra 57fa804bb2 docs: remove Component and Directives (#45828)
Move all content to example-zippy.component.ts

PR Close #45828
2022-06-10 16:11:09 +00:00
alefra 008111d2c2 docs: create file to improve docs (#45828)
Move ZippyComponent and ZippyContentDirective to example-zippy.component.ts file to improve readability of the docs

PR Close #45828
2022-06-10 16:11:09 +00:00
alefra d6c370bc67 docs: modify header and path of code-example (#45828)
In the example, @ContentChild is used in app.component.ts but the component we want to project content into is example-zippy.component.ts.
PR Close #45828
2022-06-10 16:11:09 +00:00
dario-piotrowicz 974da3f802 fix(docs-infra): improve accessibility of aio-select component (#46013)
improve the accessibility of the aio-select component so that it is
clear for screen reader users its functionality (currently it is
presented as a simple button), following the WAI-ARIA authoring
practices (see: https://www.w3.org/TR/wai-aria-practices/#combobox)

A first attempt in improving the accessibility of the component has been
tried in PR #45937 by replacing it with the material select component,
such implementation has however been scrapped since the increase of
payload sizes has proven prohibitively large

(also note that given native select elements haven't been used given the lack
of syling options for such elements)

PR Close #46013
2022-06-10 16:10:35 +00:00
dario-piotrowicz 5e20f60efa fix(docs-infra): add missing aria-labels to contributors page (#46324)
add proper aria-labels for the twitter and website link of contributors
(which being icons they have no text) so that they can be correctly read
by screenreaders

also add aria-labels to the view-bio buttons for a better user
experience

PR Close #46324
2022-06-10 16:09:25 +00:00
Renovate Bot 0410c0901e build: update all non-major dependencies (#46150)
PR Close #46150
2022-06-10 14:26:34 +00:00
dario-piotrowicz 51297e1493 docs: fix "for to learn more" typo (#46095)
PR Close #46095
2022-06-10 14:24:37 +00:00
dario-piotrowicz 521c7dd03e docs: add standalone info to aio glossary (#46095)
add information about standalone components, directives and pipes in the
guide glossary

PR Close #46095
2022-06-10 14:24:37 +00:00
Younes Jaaidi 3b304219c4 docs: use better wording (#46314)
Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>
PR Close #46314
2022-06-10 14:21:06 +00:00
Younes Jaaidi 78ae490e0a docs: clarify OnPush (#46314)
PR Close #46314
2022-06-10 14:21:06 +00:00