Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div>
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">
<button class="docs-primary-btn" [attr.text]="'Learn more'" aria-label="Learn More">
<button type="button" class="docs-primary-btn" [attr.text]="'Learn more'" aria-label="Learn More">
Learn more
</button>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div>
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">
<button class="docs-primary-btn" [attr.text]="'詳細を見る'" aria-label="詳細を見る">
<button type="button" class="docs-primary-btn" [attr.text]="'詳細を見る'" aria-label="詳細を見る">
詳細を見る
</button>
</a>
Expand Down
477 changes: 477 additions & 0 deletions adev-ja/src/app/features/home/home.component.en.html

Large diffs are not rendered by default.

477 changes: 477 additions & 0 deletions adev-ja/src/app/features/home/home.component.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions adev-ja/src/app/features/update/update.component.en.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3>Angular versions</h3>
<span class="adev-template-select">
From v.

<button [cdkMenuTriggerFor]="templatesMenuFrom">
<button type="button" [cdkMenuTriggerFor]="templatesMenuFrom">
<span>{{ from.name }}</span>
<docs-icon>expand_more</docs-icon>
</button>
Expand All @@ -31,7 +31,7 @@ <h3>Angular versions</h3>
<span>
<span class="adev-template-select">
To v.
<button [cdkMenuTriggerFor]="templatesMenuTo">
<button type="button" [cdkMenuTriggerFor]="templatesMenuTo">
<span>{{ to.name }}</span>
<docs-icon>expand_more</docs-icon>
</button>
Expand Down
6 changes: 4 additions & 2 deletions adev-ja/src/app/features/update/update.component.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ export default class UpdateComponent {
}
}

@HostListener('click', ['$event.target'])
copyCode({tagName, textContent}: Element) {
@HostListener('click', ['$event'])
copyCode(event: Event) {
const {tagName, textContent} = event.target as Element;

if (tagName === 'CODE') {
this.clipboard.copy(textContent!);
this.snackBar.open('Copied to clipboard', '', {duration: 2000});
Expand Down
4 changes: 2 additions & 2 deletions adev-ja/src/app/features/update/update.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3>Angularバージョン</h3>
<span class="adev-template-select">
v.

<button [cdkMenuTriggerFor]="templatesMenuFrom">
<button type="button" [cdkMenuTriggerFor]="templatesMenuFrom">
<span>{{ from.name }}</span>
<docs-icon>expand_more</docs-icon>
</button>
Expand All @@ -31,7 +31,7 @@ <h3>Angularバージョン</h3>
<span>
<span class="adev-template-select">
から v.
<button [cdkMenuTriggerFor]="templatesMenuTo">
<button type="button" [cdkMenuTriggerFor]="templatesMenuTo">
<span>{{ to.name }}</span>
<docs-icon>expand_more</docs-icon>
</button>
Expand Down
6 changes: 4 additions & 2 deletions adev-ja/src/app/features/update/update.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,10 @@ export default class UpdateComponent {
}
}

@HostListener('click', ['$event.target'])
copyCode({tagName, textContent}: Element) {
@HostListener('click', ['$event'])
copyCode(event: Event) {
const {tagName, textContent} = event.target as Element;

if (tagName === 'CODE') {
this.clipboard.copy(textContent!);
this.snackBar.open('Copied to clipboard', '', {duration: 2000});
Expand Down
6 changes: 3 additions & 3 deletions adev-ja/src/content/ai/design-patterns.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A common pattern when working with user-provided prompts is to separate the user
2. When the user submits (e.g., by clicking a button), update a second signal with contents of the first signal.
3. Use the second signal in the **`params`** field of your `resource`.

This setup ensures the resource's **`loader`** function only runs when the user explicitly submits their prompt, not on every keystroke. You can use additional signal parameters, like a `sessionId` or `userId` (which can be useful for creating persistent LLM sessions), in the `loader` field. This way, the request always uses these parameters' current values without re-triggering the asyncronous function defined in the `loader` field.
This setup ensures the resource's **`loader`** function only runs when the user explicitly submits their prompt, not on every keystroke. You can use additional signal parameters, like a `sessionId` or `userId` (which can be useful for creating persistent LLM sessions), in the `loader` field. This way, the request always uses these parameters' current values without re-triggering the asynchronous function defined in the `loader` field.

Many AI SDKs provide helper methods for making API calls. For example, the Genkit client library exposes a `runFlow` method for calling Genkit flows, which you can call from a resource's `loader`. For other APIs, you can use the [`httpResource`](guide/signals/resource#reactive-data-fetching-with-httpresource).

Expand Down Expand Up @@ -90,14 +90,14 @@ The following example demonstrates how to create a responsive UI to dynamically


## AI patterns in action: streaming chat responses
Interfaces often display partial results from LLM-based APIs incrementally as response data arrives. Angular's resource API provides the ability to stream responses to support this type of pattern. The `stream` property of `resource` accepts an asyncronous function you can use to apply updates to a signal value over time. The signal being updated represents the data being streamed.
Interfaces often display partial results from LLM-based APIs incrementally as response data arrives. Angular's resource API provides the ability to stream responses to support this type of pattern. The `stream` property of `resource` accepts an asynchronous function you can use to apply updates to a signal value over time. The signal being updated represents the data being streamed.

```ts
characters = resource({
stream: async () => {
const data = signal<ResourceStreamItem<string>>({value: ''});
// Calls a Genkit streaming flow using the streamFlow method
// expose by the Genkit client SDK
// exposed by the Genkit client SDK
const response = streamFlow({
url: '/streamCharacters',
input: 10
Expand Down
2 changes: 1 addition & 1 deletion adev-ja/src/content/ai/design-patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ characters = resource({
stream: async () => {
const data = signal<ResourceStreamItem<string>>({value: ''});
// Calls a Genkit streaming flow using the streamFlow method
// expose by the Genkit client SDK
// exposed by the Genkit client SDK
const response = streamFlow({
url: '/streamCharacters',
input: 10
Expand Down
22 changes: 12 additions & 10 deletions adev-ja/src/content/ai/mcp-server-setup.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

The Angular CLI includes an experimental [Model Context Protocol (MCP) server](https://modelcontextprotocol.io/) enabling AI assistants in your development environment to interact with the Angular CLI. We've included support for CLI powered code generation, adding packages, and more.

## Available Tools

The Angular CLI MCP server provides several tools to assist you in your development workflow. By default, the following tools are enabled:

| Name | Description | `local-only` | `read-only` |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------: | :---------: |
| `get_best_practices` | Retrieves the Angular Best Practices Guide. This guide is essential for ensuring that all code adheres to modern standards, including standalone components, typed forms, and modern control flow. | ✅ | ✅ |
| `list_projects` | Lists the names of all applications and libraries defined within an Angular workspace. It reads the `angular.json` configuration file to identify the projects. | ✅ | ✅ |
| `search_documentation` | Searches the official Angular documentation at https://angular.dev. This tool should be used to answer any questions about Angular, such as for APIs, tutorials, and best practices. | ❌ | ✅ |

## Get Started

To get started, run the following command in your terminal:

```bash
Expand Down Expand Up @@ -124,16 +136,6 @@ For example, to run the server in read-only mode in VS Code, you would update yo
}
```

## Available Tools

The Angular CLI MCP server provides several tools to assist you in your development workflow. By default, the following tools are enabled:

| Name | Description | `local-only` | `read-only` |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------: | :---------: |
| `get_best_practices` | Retrieves the Angular Best Practices Guide. This guide is essential for ensuring that all code adheres to modern standards, including standalone components, typed forms, and modern control flow. | ✅ | ✅ |
| `list_projects` | Lists the names of all applications and libraries defined within an Angular workspace. It reads the `angular.json` configuration file to identify the projects. | ✅ | ✅ |
| `search_documentation` | Searches the official Angular documentation at https://angular.dev. This tool should be used to answer any questions about Angular, such as for APIs, tutorials, and best practices. | ❌ | ✅ |

## Feedback and New Ideas

The Angular team welcomes your feedback on the existing MCP capabilities and any ideas you have for new tools or features. Please share your thoughts by opening an issue on the [angular/angular GitHub repository](https://github.com/angular/angular/issues).
22 changes: 12 additions & 10 deletions adev-ja/src/content/ai/mcp-server-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@

Angular CLIには、開発環境のAIアシスタントがAngular CLIと対話できるようにする実験的な[Model Context Protocol (MCP) サーバー](https://modelcontextprotocol.io/)が含まれています。CLIによるコード生成、パッケージの追加などに対応しています。

## 利用可能なツール

Angular CLI MCPサーバーは、開発ワークフローを支援するいくつかのツールを提供します。デフォルトで、以下のツールが有効になっています:

| 名前 | 説明 | `local-only` | `read-only` |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------: | :---------: |
| `get_best_practices` | Angularベストプラクティスガイドを取得します。このガイドは、スタンドアロンコンポーネント、型付きフォーム、モダンな制御フローなど、すべてのコードが現代的な標準に準拠することを保証するために不可欠です。 | ✅ | ✅ |
| `list_projects` | Angularワークスペース内で定義されたすべてのアプリケーションとライブラリの名前を一覧表示します。`angular.json`設定ファイルを読み取ってプロジェクトを識別します。 | ✅ | ✅ |
| `search_documentation` | https://angular.dev の公式Angularドキュメントを検索します。このツールは、API、チュートリアル、ベストプラクティスなど、Angularに関する質問に答えるために使用する必要があります。 | ❌ | ✅ |

## 開始方法

開始するには、ターミナルで次のコマンドを実行します。

```bash
Expand Down Expand Up @@ -124,16 +136,6 @@ JetBrains IDEs(IntelliJ IDEAやWebStormなど)では、JetBrains AI Assistan
}
```

## 利用可能なツール

Angular CLI MCPサーバーは、開発ワークフローを支援するいくつかのツールを提供します。デフォルトで、以下のツールが有効になっています:

| 名前 | 説明 | `local-only` | `read-only` |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------: | :---------: |
| `get_best_practices` | Angularベストプラクティスガイドを取得します。このガイドは、スタンドアロンコンポーネント、型付きフォーム、モダンな制御フローなど、すべてのコードが現代的な標準に準拠することを保証するために不可欠です。 | ✅ | ✅ |
| `list_projects` | Angularワークスペース内で定義されたすべてのアプリケーションとライブラリの名前を一覧表示します。`angular.json`設定ファイルを読み取ってプロジェクトを識別します。 | ✅ | ✅ |
| `search_documentation` | https://angular.dev の公式Angularドキュメントを検索します。このツールは、API、チュートリアル、ベストプラクティスなど、Angularに関する質問に答えるために使用する必要があります。 | ❌ | ✅ |

## フィードバックと新しいアイデア

Angularチームは、既存のMCP機能に対するフィードバックや新しいツールまたは機能のアイデアを歓迎します。[angular/angular GitHubリポジトリ](https://github.com/angular/angular/issues)でissueを作成して、ご意見をお聞かせください。
2 changes: 1 addition & 1 deletion adev-ja/src/content/ai/overview.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Here are examples of how to build with Genkit and Angular:

* [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.

* [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.
* [Use Genkit in an Angular app](https://genkit.dev/docs/angular/)— Build a basic application that uses Genkit Flows, Angular and Gemini 2.5 Flash. This step-by-step walkthrough guides you through creating a full-stack Angular application with AI features.

* [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.

Expand Down
2 changes: 1 addition & 1 deletion adev-ja/src/content/ai/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ GenkitとAngularで構築する方法の例を次に示します。

* [GenkitとAngularのスターターキットを使用したエージェントアプリ](https://github.com/angular/examples/tree/main/genkit-angular-starter-kit)— AIでの構築は初めてですか?エージェントワークフローを備えた基本的なアプリケーションから始めましょう。初めてのAI構築体験に最適な場所です。

* [AngularアプリでGenkitを使用する](https://genkit.dev/docs/angular/)— Genkit Flows、Angular、Gemini 2.0 Flashを使用する基本的なアプリケーションを構築します。このステップバイステップのウォークスルーは、AI機能を備えたフルスタックAngularアプリケーションの作成をガイドします。
* [AngularアプリでGenkitを使用する](https://genkit.dev/docs/angular/)— Genkit Flows、Angular、Gemini 2.5 Flashを使用する基本的なアプリケーションを構築します。このステップバイステップのウォークスルーは、AI機能を備えたフルスタックAngularアプリケーションの作成をガイドします。

* [動的ストーリー生成アプリ](https://github.com/angular/examples/tree/main/genkit-angular-story-generator)— Genkit、Gemini、Imagen 3を搭載したエージェントAngularアプリケーションを構築し、ユーザーインタラクションに基づいてストーリーを動的に生成し、発生するイベントに付随する美しい画像パネルを特徴とする方法を学びます。より高度なユースケースを試したい場合は、ここから始めましょう。

Expand Down
2 changes: 1 addition & 1 deletion adev-ja/src/content/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Install the CLI using the `npm` package manager:

<code-example format="shell" language="shell">

npm install -g &commat;angular/cli<aio-angular-dist-tag class="pln"></aio-angular-dist-tag>
npm install -g @angular/cli<aio-angular-dist-tag class="pln"></aio-angular-dist-tag>

</code-example>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RxJS interop with Angular signals

The `@angular/rxjs-interop` package offers APIs that help you integrate RxJS and Angular signals.
The `@angular/core/rxjs-interop` package offers APIs that help you integrate RxJS and Angular signals.

## Create a signal from an RxJs Observable with `toSignal`

Expand Down
Loading