Skip to content

Commit 8108321

Browse files
authored
fix: Update origin 20.0.6 (#1043)
* fix: update origin to 20.0.6 * fix: add new guides * fix: migrate untranslated files * fix: migrate changes * fix: migrate changes * fix: migrate patches * chore: lint fix
1 parent 40a61d1 commit 8108321

File tree

84 files changed

+1120
-346
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+1120
-346
lines changed

adev-ja/src/app/features/update/recommendations.en.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,6 +2592,28 @@ export const RECOMMENDATIONS: Step[] = [
25922592
action:
25932593
'Adjust code that directly calls functions returning `RedirectFn`. These functions can now also return an `Observable` or `Promise`; ensure your logic correctly handles these asynchronous return types.',
25942594
},
2595+
{
2596+
possibleIn: 2000,
2597+
necessaryAsOf: 2000,
2598+
level: ApplicationComplexity.Basic,
2599+
step: '20.0.0_rename_resource_request_to_param',
2600+
action: 'Rename the `request` property passed in resources to `params`.',
2601+
},
2602+
{
2603+
possibleIn: 2000,
2604+
necessaryAsOf: 2000,
2605+
level: ApplicationComplexity.Medium,
2606+
step: '20.0.0_rename_rxResource_loader_to_stream',
2607+
action: 'Rename the `loader` property passed in rxResources to `stream`.',
2608+
},
2609+
{
2610+
possibleIn: 2000,
2611+
necessaryAsOf: 2000,
2612+
level: ApplicationComplexity.Basic,
2613+
step: '20.0.0_replace_ResourceStatus_by_corresponding_strings',
2614+
action:
2615+
'`ResourceStatus` is no longer an enum. Use the corresponding constant string values instead.',
2616+
},
25952617
{
25962618
possibleIn: 2000,
25972619
necessaryAsOf: 2000,
@@ -2712,4 +2734,12 @@ export const RECOMMENDATIONS: Step[] = [
27122734
action:
27132735
'Review `DatePipe` usages. Using the `Y` (week-numbering year) formatter without also including `w` (week number) is now detected as suspicious. Use `y` (year) if that was the intent, or include `w` alongside `Y`.',
27142736
},
2737+
{
2738+
possibleIn: 2000,
2739+
necessaryAsOf: 2000,
2740+
level: ApplicationComplexity.Medium,
2741+
step: '20.0.0_handle_uncaught_listener_errors_in_tests',
2742+
action:
2743+
'In templates parentheses are now always respected. This can lead to runtime breakages when nullish coalescing were nested in parathesis. eg `(foo?.bar).baz` will throw if `foo` is nullish as it would in native JavaScript.',
2744+
},
27152745
];

adev-ja/src/app/features/update/recommendations.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,6 +2592,28 @@ export const RECOMMENDATIONS: Step[] = [
25922592
action:
25932593
'`RedirectFn`を返す関数を直接呼び出すコードを調整してください。これらの関数は`Observable`または`Promise`も返すことができるようになりました。ロジックがこれらの非同期戻り値を正しく処理することを確認してください。',
25942594
},
2595+
{
2596+
possibleIn: 2000,
2597+
necessaryAsOf: 2000,
2598+
level: ApplicationComplexity.Basic,
2599+
step: '20.0.0_rename_resource_request_to_param',
2600+
action: 'リソースで渡される`request`プロパティを`params`にリネームしてください。',
2601+
},
2602+
{
2603+
possibleIn: 2000,
2604+
necessaryAsOf: 2000,
2605+
level: ApplicationComplexity.Medium,
2606+
step: '20.0.0_rename_rxResource_loader_to_stream',
2607+
action: 'rxResourcesで渡される`loader`プロパティを`stream`にリネームしてください。',
2608+
},
2609+
{
2610+
possibleIn: 2000,
2611+
necessaryAsOf: 2000,
2612+
level: ApplicationComplexity.Basic,
2613+
step: '20.0.0_replace_ResourceStatus_by_corresponding_strings',
2614+
action:
2615+
'`ResourceStatus`はもはやenumではありません。代わりに対応する定数文字列値を使用してください。',
2616+
},
25952617
{
25962618
possibleIn: 2000,
25972619
necessaryAsOf: 2000,
@@ -2712,4 +2734,12 @@ export const RECOMMENDATIONS: Step[] = [
27122734
action:
27132735
'`DatePipe`の使用を見直してください。`Y`(週番号付け年)フォーマッターを`w`(週番号)を含めずに使用すると、疑わしいと検出されるようになりました。意図がそうであった場合は`y`(年)を使用するか、`Y`と一緒に`w`を含めてください。',
27142736
},
2737+
{
2738+
possibleIn: 2000,
2739+
necessaryAsOf: 2000,
2740+
level: ApplicationComplexity.Medium,
2741+
step: '20.0.0_handle_uncaught_listener_errors_in_tests',
2742+
action:
2743+
'テンプレートでは括弧が常に尊重されるようになりました。これは、null合体演算子が括弧内にネストされている場合にランタイムエラーを引き起こす可能性があります。例:`(foo?.bar).baz`は、`foo`がnullishの場合、ネイティブJavaScriptと同様にエラーを投げます。',
2744+
},
27152745
];

adev-ja/src/app/sub-navigation-data.en.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,16 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
351351
path: 'guide/routing/read-route-state',
352352
contentPath: 'guide/routing/read-route-state',
353353
},
354+
{
355+
label: 'Redirecting routes',
356+
path: 'guide/routing/redirecting-routes',
357+
contentPath: 'guide/routing/redirecting-routes',
358+
},
359+
{
360+
label: 'Control route access with guards',
361+
path: 'guide/routing/route-guards',
362+
contentPath: 'guide/routing/route-guards',
363+
},
354364
{
355365
label: 'Other routing tasks',
356366
path: 'guide/routing/common-router-tasks',
@@ -421,6 +431,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
421431
path: 'guide/http/making-requests',
422432
contentPath: 'guide/http/making-requests',
423433
},
434+
{
435+
label: 'Reactive data fetching with httpResource',
436+
path: 'guide/http/http-resource',
437+
contentPath: 'guide/http/http-resource',
438+
},
424439
{
425440
label: 'Intercepting requests and responses',
426441
path: 'guide/http/interceptors',
@@ -623,6 +638,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
623638
path: 'ai',
624639
contentPath: 'ai/overview',
625640
},
641+
{
642+
label: 'LLM prompts and AI IDE setup',
643+
path: 'ai/develop-with-ai',
644+
contentPath: 'ai/develop-with-ai',
645+
},
626646
],
627647
},
628648
{
@@ -763,6 +783,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
763783
path: 'best-practices/a11y',
764784
contentPath: 'best-practices/a11y',
765785
},
786+
{
787+
label: 'Unhandled errors in Angular',
788+
path: 'best-practices/error-handling',
789+
contentPath: 'best-practices/error-handling',
790+
},
766791
{
767792
label: 'Performance',
768793
children: [
@@ -786,6 +811,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
786811
path: 'best-practices/skipping-subtrees',
787812
contentPath: 'best-practices/runtime-performance/skipping-subtrees',
788813
},
814+
{
815+
label: 'Profiling with the Chrome DevTools',
816+
path: 'best-practices/profiling-with-chrome-devtools',
817+
contentPath: 'best-practices/runtime-performance/profiling-with-chrome-devtools',
818+
},
789819
{label: 'Zoneless', path: 'guide/zoneless', contentPath: 'guide/zoneless'},
790820
],
791821
},

adev-ja/src/app/sub-navigation-data.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,16 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
351351
path: 'guide/routing/read-route-state',
352352
contentPath: 'guide/routing/read-route-state',
353353
},
354+
{
355+
label: 'ルートのリダイレクト',
356+
path: 'guide/routing/redirecting-routes',
357+
contentPath: 'guide/routing/redirecting-routes',
358+
},
359+
{
360+
label: 'ガードによるルートアクセスの制御',
361+
path: 'guide/routing/route-guards',
362+
contentPath: 'guide/routing/route-guards',
363+
},
354364
{
355365
label: 'その他のルーティングタスク',
356366
path: 'guide/routing/common-router-tasks',
@@ -421,6 +431,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
421431
path: 'guide/http/making-requests',
422432
contentPath: 'guide/http/making-requests',
423433
},
434+
{
435+
label: 'httpResourceを使ったリアクティブなデータ取得',
436+
path: 'guide/http/http-resource',
437+
contentPath: 'guide/http/http-resource',
438+
},
424439
{
425440
label: 'リクエストとレスポンスへの介入',
426441
path: 'guide/http/interceptors',
@@ -623,6 +638,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
623638
path: 'ai',
624639
contentPath: 'ai/overview',
625640
},
641+
{
642+
label: 'LLMプロンプトとAI IDEセットアップ',
643+
path: 'ai/develop-with-ai',
644+
contentPath: 'ai/develop-with-ai',
645+
},
626646
],
627647
},
628648
{
@@ -763,6 +783,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
763783
path: 'best-practices/a11y',
764784
contentPath: 'best-practices/a11y',
765785
},
786+
{
787+
label: 'Angularでの未処理のエラー',
788+
path: 'best-practices/error-handling',
789+
contentPath: 'best-practices/error-handling',
790+
},
766791
{
767792
label: 'パフォーマンス',
768793
children: [
@@ -786,6 +811,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
786811
path: 'best-practices/skipping-subtrees',
787812
contentPath: 'best-practices/runtime-performance/skipping-subtrees',
788813
},
814+
{
815+
label: 'Chrome DevToolsでのプロファイリング',
816+
path: 'best-practices/profiling-with-chrome-devtools',
817+
contentPath: 'best-practices/runtime-performance/profiling-with-chrome-devtools',
818+
},
789819
{label: 'Zoneless', path: 'guide/zoneless', contentPath: 'guide/zoneless'},
790820
],
791821
},
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# LLM prompts and AI IDE setup
2+
Generating code with large language models (LLMs) is a rapidly growing area of interest for developers. While LLMs are often capable of generating working code it can be a challenge to generate code for consistently evolving frameworks like Angular.
3+
4+
Advanced instructions and prompting are an emerging standard for supporting modern code generation with domain specific details. This section contains curated content and resources to support more accurate code generation for Angular and LLMs.
5+
6+
## Custom Prompts and System Instructions
7+
Improve your experience generating code with LLMs by using one of the following custom, domain specific files.
8+
9+
NOTE: These files will be updated on a regular basis staying up to date with Angular's conventions.
10+
11+
Here is a set of instructions to help LLMs generate correct code that follows Angular best practices. This file can be included as system instructions to your AI tooling or included along with your prompt as context.
12+
13+
<docs-code language="md" path="adev/src/context/best-practices.md" class="compact"/>
14+
15+
<a download href="/assets/context/best-practices.md" target="_blank">Click here to download the best-practices.md file.</a>
16+
17+
## Rules Files
18+
Several editors, such as <a href="https://studio.firebase.google.com?utm_source=adev&utm_medium=website&utm_campaign=BUILD_WITH_AI_ANGULAR&utm_term=angular_devrel&utm_content=build_with_ai_angular_firebase_studio">Firebase Studio</a> have rules files useful for providing critical context to LLMs.
19+
20+
| Environment/IDE | Rules File | Installation Instructions |
21+
|:----------------|:----------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------|
22+
| Firebase Studio | <a download href="/assets/context/airules.md" target="_blank">airules.md</a> | <a href="https://firebase.google.com/docs/studio/set-up-gemini#custom-instructions">Configure `airules.md`</a> |
23+
| Copilot powered IDEs | <a download="copilot-instructions.md" href="/assets/context/guidelines.md" target="_blank">copilot-instructions.md</a> | <a href="https://code.visualstudio.com/docs/copilot/copilot-customization#_custom-instructions" target="_blank">Configure `.github/copilot-instructions.md`</a> |
24+
| Cursor | <a download href="/assets/context/angular-20.mdc" target="_blank">cursor.md</a> | <a href="https://docs.cursor.com/context/rules" target="_blank">Configure `cursorrules.md`</a> |
25+
| JetBrains IDEs | <a download href="/assets/context/guidelines.md" target="_blank">guidelines.md</a> | <a href="https://www.jetbrains.com/help/junie/customize-guidelines.html" target="_blank">Configure `guidelines.md`</a> |
26+
| VS Code | <a download=".instructions.md" href="/assets/context/guidelines.md" target="_blank">.instructions.md</a> | <a href="https://code.visualstudio.com/docs/copilot/copilot-customization#_custom-instructions" target="_blank">Configure `.instructions.md`</a> |
27+
| Windsurf | <a download href="/assets/context/guidelines.md" target="_blank">guidelines.md</a> | <a href="https://docs.windsurf.com/windsurf/cascade/memories#rules" target="_blank">Configure `guidelines.md`</a> |
28+
29+
## Providing Context with `llms.txt`
30+
`llms.txt` is a proposed standard for websites designed to help LLMs better understand and process their content. The Angular team has developed two versions of this file to help LLMs and tools that use LLMs for code generation to create better modern Angular code.
31+
32+
33+
* <a href="/llms.txt" target="_blank">llms.txt</a> - an index file providing links to key files and resources.
34+
* <a href="/llms-full.txt" target="_blank">llms-full.txt</a> - a more robust compiled set of resources describing how Angular works and how to build Angular applications.
35+
36+
Be sure [to check out the overview page](/ai) for more information on how to integrate AI into your Angular applications.

adev-ja/src/content/ai/overview.en.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Build AI-powered apps. Develop faster with AI.
44
</docs-decorative-header>
55

6+
HELPFUL: Looking to get started with building in your favorite AI powered IDE? <br>Check out our [prompt rules and best practices](/ai/develop-with-ai).
7+
68
Generative AI (GenAI) with large language models (LLMs) enables the creation of sophisticated and engaging application experiences, including personalized content, intelligent recommendations, media generation and comprehension, information summarization, and dynamic functionality.
79

810
Developing features like these would have previously required deep domain expertise and significant engineering effort. However, new products and SDKs are lowering the barrier to entry. Angular is well-suited for integrating AI into your web application as a result of:
@@ -11,7 +13,7 @@ Developing features like these would have previously required deep domain expert
1113
* Strong, signal-based architecture designed to dynamically manage data and state
1214
* Angular integrates seamlessly with AI SDKs and APIs
1315

14-
This guide demonstrates how you can use [Genkit](/ai#build-ai-powered-applications-with-genkit-and-angular), [Firebase AI Logic](https://firebase.google.com/products/firebase-ai-logic), and the [Gemini API](https://ai.google.dev/) to infuse your Angular apps with AI today. This guide will jumpstart your AI-powered web app development journey by explaining how to begin integrating AI into Angular apps. This guide also shares resources, such as starter kits, example code, and recipes for common workflows, you can use to get up to speed quickly.
16+
This guide demonstrates how you can use [Genkit](/ai#build-ai-powered-applications-with-genkit-and-angular), [Firebase AI Logic](/ai#build-ai-powered-applications-with-firebase-ai-logic-and-angular), and the [Gemini API](/ai#build-ai-powered-applications-with-gemini-api-and-angular) to infuse your Angular apps with AI today. This guide will jumpstart your AI-powered web app development journey by explaining how to begin integrating AI into Angular apps. This guide also shares resources, such as starter kits, example code, and recipes for common workflows, you can use to get up to speed quickly.
1517

1618
To get started, you should have a basic understanding of Angular. New to Angular? Try our [essentials guide](/essentials) or our [getting started tutorials](/tutorials).
1719

@@ -20,20 +22,20 @@ NOTE: While this page features integrations and examples with Google AI products
2022
## Getting Started
2123
Building AI-powered applications is a new and rapidly developing field. It can be challenging to decide where to start and which technologies to choose. The following section provides three options to choose from:
2224

23-
1. *Genkit* gives you the choice of [supported model and interface with a unified API](https://firebase.google.com/docs/genkit) for building full-stack applications. Ideal for applications requiring sophisticated back-end AI logic, such as personalized recommendations.
25+
1. *Genkit* gives you the choice of [supported model and interface with a unified API](https://genkit.dev) for building full-stack applications. Ideal for applications requiring sophisticated back-end AI logic, such as personalized recommendations.
2426

2527
1. *Firebase AI Logic* provides a secure client-side API for Google's models to build client-side only applications or mobile apps. Best for interactive AI features directly in the browser, such as real-time text analysis or basic chatbots.
2628

2729
1. *Gemini API* enables you to build an application that uses the methods and functionality exposed through the API surface directly, best for full-stack applications. Suitable for applications needing direct control over AI models, like custom image generation or deep data processing.
2830

2931
### Build AI-powered applications with Genkit and Angular
30-
[Genkit](https://firebase.google.com/docs/genkit) is an open-source toolkit designed to help you build AI-powered features in web and mobile apps. It offers a unified interface for integrating AI models from Google, OpenAI, Anthropic, Ollama, and more, so you can explore and choose the best models for your needs. As a server-side solution, your web apps need a supported server environment, such as a node-based server in order to integrate with Genkit. Building a full-stack app using Angular SSR gives you the starting server-side code, for example.
32+
[Genkit](https://genkit.dev) is an open-source toolkit designed to help you build AI-powered features in web and mobile apps. It offers a unified interface for integrating AI models from Google, OpenAI, Anthropic, Ollama, and more, so you can explore and choose the best models for your needs. As a server-side solution, your web apps need a supported server environment, such as a node-based server in order to integrate with Genkit. Building a full-stack app using Angular SSR gives you the starting server-side code, for example.
3133

3234
Here are examples of how to build with Genkit and Angular:
3335

3436
* [Agentic Apps with Genkit and Angular starter-kit](https://github.com/angular/examples/tree/main/genkit-angular-starter-kit)— New to building with AI? Start here with a basic app that features an agentic workflow. Perfect place to start for your first AI building experience.
3537

36-
* [Use Genkit in an Angular app](https://firebase.google.com/docs/genkit/angular)— Build a basic application that uses Genkit Flows, Angular and Gemini 2.0 Flash. This step-by-step walkthrough guides you through creating a full-stack Angular application with AI features.
38+
* [Use Genkit in an Angular app](https://genkit.dev/docs/angular/)— Build a basic application that uses Genkit Flows, Angular and Gemini 2.0 Flash. This step-by-step walkthrough guides you through creating a full-stack Angular application with AI features.
3739

3840
* [Dynamic Story Generator app](https://github.com/angular/examples/tree/main/genkit-angular-story-generator)— Learn to build an agentic Angular app powered by Genkit, Gemini and Imagen 3 to dynamically generate a story based on user interaction featuring beautiful image panels to accompany the events that take place. Start here if you'd like to experiment with a more advanced use-case.
3941

0 commit comments

Comments
 (0)