1492 Commits

Author SHA1 Message Date
SkyZeroZx 566ad05f20 fix(common): skip transfer cache for uncacheable HTTP traffic
Do not store HTTP transfer cache entries when either the request or response uses `Cache-Control: no-store`, `Cache-Control: private`, or `Cache-Control: no-cache`.

Also skip transfer cache when requests use the Fetch API `cache` option with `no-store` or `no-cache`.

Because transfer cache serializes SSR HTTP responses into the rendered HTML, Angular now treats these directives conservatively to avoid exposing sensitive or explicitly uncacheable data through `TransferState`.

(cherry picked from commit 4d150156ca)

(cherry picked from commit 64ce11fcd4)
2026-06-03 11:00:26 -07:00
SkyZeroZx e2ef1ce72a fix(http): skip transfer cache for fetch credentialed requests
Treat HttpClient requests using `credentials: 'include'` and `same-origin` as credentialed when deciding whether a response can be stored in the HTTP transfer cache.

The transfer cache already skips requests with `withCredentials`, `Cookie`, `Authorization`, or `Proxy-Authorization` because those responses may contain user-specific data. Fetch-backed requests can express the same credentialed behavior through the `credentials` option, so these responses must not be serialized into the SSR HTML.

This keeps credentialed SSR responses out of TransferState and aligns the cache eligibility check with the fetch request options supported by HttpClient.

(cherry picked from commit 8ec01970d2)
2026-06-03 11:00:26 -07:00
Yenya030 de7b2a62e7 fix(http): exclude withCredentials requests from transfer cache
Update the transfer cache check to safely exclude all requests sent with the `withCredentials` flag.

By default, the HTTP transfer cache avoids caching user-specific responses to prevent sensitive data exposure or incorrect caching. While requests with explicit headers like `Cookie` or `Authorization` are excluded by default, requests can also be sent with credentials via the `withCredentials` flag without having those headers explicitly declared on the request object.

To keep user-specific responses from being cached, exclude `withCredentials` requests unconditionally, even when the `includeRequestsWithAuthHeaders` option is set to true.
2026-05-27 10:25:28 -07:00
Yenya030 4233188d8e fix(http): skip TransferCache for cookie-bearing requests by default
Treat requests with a Cookie header like other auth-bearing requests and skip TransferCache caching them by default.

This preserves the explicit opt-in path via includeRequestsWithAuthHeaders, adds regression coverage for cookie-bearing requests, and updates the SSR guide to document the behavior.
2026-05-27 10:25:28 -07:00
kirjs 24c999a56e fix(docs-infra): add moduleResolution to TypeScript compiler options for playground
This fixes signal forms, but idk if it breas other things

(cherry picked from commit 040af1aaa1)
2025-11-19 16:26:23 +00:00
Shuaib Hasan Akib 5aea52ac29 docs: format examples with replacing <docs-code> typescript examples with fenced ts code blocks
Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8102.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/extended-diagnostics/NG8103.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>

Update adev/src/content/reference/migrations/cleanup-unused-imports.md

Co-authored-by: Alan Agius <alan.agius4@gmail.com>
(cherry picked from commit 27fa993fb8)
2025-11-18 22:11:27 +00:00
Shuaib Hasan Akib 3686987622 docs: simplify docs-code header by removing paths and keeping only file name and info
(cherry picked from commit 374c36d810)
2025-11-18 16:15:44 +00:00
SkyZeroZx 72b19d869d docs: replace @HostListener with host event bindings in attribute directives
(cherry picked from commit c93d02151a)
2025-11-17 23:09:15 +00:00
ljasek efe5d2ebe3 docs: fix JetBrains AI Assistant MCP JSON configuration
(cherry picked from commit 6d35ab8c28)
2025-11-17 23:08:18 +00:00
aparziale 81b6e45b60 docs(docs-infra): add advanced recommendations
Added recommendation in advanced section for redirectTo and canMatch will generate an error. These properties are incompatible together

fixes #65267

(cherry picked from commit c757fd6c29)
2025-11-17 22:40:12 +00:00
Paul Leflon 967e111303 docs: fix markdown table in custom elements guide
(cherry picked from commit f13159f811)
2025-11-17 22:33:35 +00:00
Jessica Janiuk 85777efe72 Revert "docs: replace legacy <docs-code> with fenced code blocks with highlight metadata"
This reverts commit c5c1689348.

(cherry picked from commit b2171c6c14)
2025-11-17 18:36:58 +00:00
SkyZeroZx d10f1107a8 docs: add documentation for HostAttributeToken
(cherry picked from commit d70310896c)
2025-11-17 16:47:02 +00:00
Shuaib Hasan Akib 755b360ed9 docs: replace legacy <docs-code> with fenced code blocks with highlight metadata
Replaced older <docs-code> components (e.g.
<docs-code language="ts" highlight="3">…</docs-code>)
with modern fenced code blocks using {highlight:[3]} metadata

(cherry picked from commit c5c1689348)
2025-11-17 16:43:39 +00:00
Shuaib Hasan Akib 84ceb9ca01 docs: replace <docs-code> bash examples with fenced bash code blocks
Updated bash command examples to use fenced code blocks (```bash) instead of <docs-code> components, improving formatting consistency and aligning with current documentation standards.

(cherry picked from commit 7ea60052f0)
2025-11-17 16:42:25 +00:00
Shuaib Hasan Akib 2e00074c64 docs: improve accessibility with descriptive link and main landmark
- Replaced <a><button></button></a> with a proper <a> containing text and
  aria-label to ensure links have discernible text.

- Added main tag in home page to provide
  a consistent main landmark, improving accessibility for screen readers
  and satisfying WCAG and Lighthouse requirements.

Fixes #65181.

(cherry picked from commit ee5947db38)
2025-11-17 16:32:04 +00:00
Shuaib Hasan Akib 3767126376 docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.
"src/app/open-close.component.ts" → "open-close.component.ts")
to keep examples concise and avoid unnecessary path noise.

Aligns with prior cleanup patterns (similar to angular#65016).

(cherry picked from commit 073dcd7ffd)
2025-11-17 16:30:34 +00:00
SkyZeroZx 2c3691dc1a docs: add documentation for DOCUMENT injection token usage in SSR
(cherry picked from commit 846d50ab23)
2025-11-17 16:28:04 +00:00
Angelo Parziale 66de132f8d docs(docs-infra): add npm link documentation for library development
Add comprehensive guide for using npm link with Angular libraries, including required angular.json.

(cherry picked from commit a458a83133)
2025-11-17 16:26:01 +00:00
portneon 68c5556c16 docs(router): update navigation event example to use event.code
(cherry picked from commit 93d548fba4)
2025-11-17 16:08:32 +00:00
hawkgs 9c2dccf01a docs(docs-infra): fix misaligned tutorials card
Fix the "Deferrable views" illustration which fixes the aligned within the `docs-card`.

(cherry picked from commit 6bfe107404)
2025-11-17 16:06:36 +00:00
Shuaib Hasan Akib f7fcef1439 docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.,
"src/app/open-close.component.ts" → "open-close.component.ts")
to make code examples cleaner and more focused.

(cherry picked from commit b3adb6001c)
2025-11-17 16:00:24 +00:00
SkyZeroZx e0a6dadf1b docs: Uses the self-closing tag syntax
(cherry picked from commit 9ec964334e)
2025-11-14 16:32:39 +00:00
KAUSHIK REDDY AWALA 853fd9d4cf docs(docs-infra): update di factory provider function to use correct parameters
This PR fixes a parameter mismatch in the `apiClientFactory` function documentation example. The factory was previously passing only http and `userService` to the ``ApiClient`` constructor, but the constructor actually requires http, `baseUrl`, and `rateLimitMs` as separate parameters.

Key Changes:

Extracts baseUrl and rateLimitMs from UserService using getter methods
Updates the ApiClient instantiation to pass all three required constructor parameters
Adds a comment explaining the assumption about UserService providing these values

(cherry picked from commit 6f716e400e)
2025-11-14 16:32:11 +00:00
Alessio Pelliccione 70da36f251 docs(docs-infra): improve theme picker accessibility and add animations
(cherry picked from commit 25320ae1eb)
2025-11-13 22:05:11 +00:00
Shuaib Hasan Akib 3a8fb096d6 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by #65043

(cherry picked from commit 3cfd4361a5)
2025-11-13 17:34:14 +00:00
Shuaib Hasan Akib ba28305b04 docs: replace <docs-code> block with standard fenced code block for typescript example
Replaced the <docs-code> wrapper with a Markdown fenced code block to improve
copy/paste usability, syntax highlighting consistency, and alignment with current
documentation formatting standards.

Inspired by angular#65043

(cherry picked from commit caaa5ec8e6)
2025-11-13 17:11:24 +00:00
hawkgs a586bd26e7 docs(docs-infra): improve playground layout
Improve the layout and optimize the empty space; Introduce some minor improvements to the code editor

(cherry picked from commit 7ab1b3a32a)
2025-11-13 17:07:57 +00:00
SkyZeroZx 1c4fb90857 docs: update tutorials with self-closing tags, standalone router directives, and fix syntax highlighting
(cherry picked from commit 4544135b1e)
2025-11-12 21:13:26 +00:00
SkyZeroZx 2e7623ca13 docs: correct example for RouteReuseStrategy getRouteKey
Update the example to properly demonstrate the getRouteKey method usage fixes #65021

(cherry picked from commit a48029b810)
2025-11-12 19:49:07 +00:00
SkyZeroZx 3737724504 docs: correct code block language in error handling and signals interop
(cherry picked from commit 05ef2a5ca9)
2025-11-12 19:35:13 +00:00
RobinReinecke 0baa28b886 docs: correct mermaid code block formatting
(cherry picked from commit 07703875b5)
2025-11-11 08:33:31 -08:00
Devin Chasanoff e0407c0fe3 docs: add links to SDUI example and livestream
(cherry picked from commit 5af33724a4)
2025-11-10 14:16:22 -08:00
Alan Agius 742122d5a7 docs: use markdown code fences in service worker docs
Replaces the <docs-code> component with standard markdown code fences in the service worker documentation. This improves the readability and maintainability of the documentation.

(cherry picked from commit d42f9ce3a9)
2025-11-10 12:03:35 -08:00
Shuaib Hasan Akib b20bf5dc70 docs: add shell language to CLI installation examples
Added `language="shell"` to installation command examples to display
the shell prompt `$` icon consistently across npm, pnpm, yarn, and bun
code blocks.

(cherry picked from commit 27d54654e3)
2025-11-10 08:01:33 -08:00
Shuaib Hasan Akib 77ca0d7534 docs(docs-infra): simplify file headers in <docs-code> blocks
Removed redundant "src/app/" prefix from file headers (e.g.,
"src/app/open-close.component.ts" → "open-close.component.ts")
to make code examples cleaner and more focused.

(cherry picked from commit e0a4bdd72b)
2025-11-10 08:00:37 -08:00
Shuaib Hasan Akib c5a41aae34 docs(docs-infra): removed unused import and use self-closing syntax for component
(cherry picked from commit 8c6619a531)
2025-11-10 08:00:10 -08:00
SkyZeroZx 63f1d94c2f docs: correct import path and self-closing tag in ng-content example
(cherry picked from commit 6a2f4a88de)
2025-11-10 07:52:50 -08:00
Danny Koppenhagen f04cf2299b docs(core): add a11y considerations related to @defer()
closes #53466

(cherry picked from commit d2b854b37e)
2025-11-07 15:27:13 -08:00
Shuaib Hasan Akib 143883afe3 docs(docs-infra): use self-closing syntax for component examples
Replaced multiple component tags such as `<example></example>` with
self-closing syntax (`<example />`) across documentation examples.
This improves readability and aligns with the current Angular
style conventions.

(cherry picked from commit a2cd36777a)
2025-11-07 10:24:40 -08:00
khanhkhanhlele 7f8336d9e0 docs: Fix typos in some files
(cherry picked from commit a625f6bb20)
2025-11-07 15:44:07 +00:00
Alan Agius ee578d3e86 build: format md files
Format all md files
2025-11-06 10:10:22 -08:00
SkyZeroZx feab482684 docs: correct formatting in dependency injection guides
(cherry picked from commit 61066071cf)
2025-11-06 16:34:29 +00:00
Erik Wegner ab94cd2b95 docs: Add the missing function call to use the signal's actual value
(cherry picked from commit e18aac88d4)
2025-11-05 11:47:17 -08:00
SkyZeroZx c374e80655 docs(docs-infra): add missing meta tags for author, keywords, and Twitter
(cherry picked from commit b5e37ffb77)
2025-11-04 14:58:31 -08:00
Angular Robot dd7cb3d3da docs: update Angular CLI help
Updated Angular CLI help contents.
2025-11-04 18:06:43 +00:00
Gerome Grignon 1b6d0cff40 docs(router): uniformize lazy loading syntax
(cherry picked from commit 8f49af90d0)
2025-11-04 09:39:19 -08:00
SkyZeroZx 4f7b97cc21 docs: simplify tutorial signals with self-closing component tags
(cherry picked from commit b61847f877)
2025-11-03 16:34:44 -08:00
SkyZeroZx d0b1dfaf0d docs: Update highlight inputs & code block formatting in component guides
(cherry picked from commit 82a579c7e6)
2025-11-03 16:32:46 -08:00
Shuaib Hasan Akib 3d6a206e9b docs: remove standalone: true since it's now the default
Removes redundant `standalone: true` declarations from code examples.
Standalone components are now the default in Angular, so the flag is
no longer necessary in documentation snippets.

(cherry picked from commit c4c7fb88ac)
2025-11-03 16:27:02 -08:00