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
5 changes: 3 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 @@ -71,6 +71,7 @@ export default class UpdateComponent {
protected afterRecommendations: Step[] = [];

protected readonly versions = [
{name: '21.0', number: 2100},
{name: '20.0', number: 2000},
{name: '19.0', number: 1900},
{name: '18.0', number: 1800},
Expand Down Expand Up @@ -108,8 +109,8 @@ export default class UpdateComponent {
{name: '2.1', number: 201},
{name: '2.0', number: 200},
];
protected from = this.versions.find((version) => version.name === '19.0')!;
protected to = this.versions.find((version) => version.name === '20.0')!;
protected from = this.versions.find((version) => version.name === '20.0')!;
protected to = this.versions.find((version) => version.name === '21.0')!;
protected futureVersion = 2100;

protected readonly steps: Step[] = RECOMMENDATIONS;
Expand Down
5 changes: 3 additions & 2 deletions adev-ja/src/app/features/update/update.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default class UpdateComponent {
protected afterRecommendations: Step[] = [];

protected readonly versions = [
{name: '21.0', number: 2100},
{name: '20.0', number: 2000},
{name: '19.0', number: 1900},
{name: '18.0', number: 1800},
Expand Down Expand Up @@ -108,8 +109,8 @@ export default class UpdateComponent {
{name: '2.1', number: 201},
{name: '2.0', number: 200},
];
protected from = this.versions.find((version) => version.name === '19.0')!;
protected to = this.versions.find((version) => version.name === '20.0')!;
protected from = this.versions.find((version) => version.name === '20.0')!;
protected to = this.versions.find((version) => version.name === '21.0')!;
protected futureVersion = 2100;

protected readonly steps: Step[] = RECOMMENDATIONS;
Expand Down
25 changes: 22 additions & 3 deletions adev-ja/src/app/routing/sub-navigation-data.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import FIRST_APP_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/first-app
import LEARN_ANGULAR_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/learn-angular/routes.json';
import DEFERRABLE_VIEWS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/deferrable-views/routes.json';
import SIGNALS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/signals/routes.json';
import SIGNAL_FORMS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/signal-forms/routes.json';
import ERRORS_NAV_DATA from '../../../src/assets/content/reference/errors/routes.json';
import EXT_DIAGNOSTICS_NAV_DATA from '../../../src/assets/content/reference/extended-diagnostics/routes.json';

Expand Down Expand Up @@ -435,19 +436,31 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
label: 'Overview',
path: 'guide/forms/signals/overview',
contentPath: 'guide/forms/signals/overview',
status: 'new',
},
{
label: 'Form models',
path: 'guide/forms/signals/models',
contentPath: 'guide/forms/signals/models',
status: 'new',
},
{
label: 'Field state management',
path: 'guide/forms/signals/field-state-management',
contentPath: 'guide/forms/signals/field-state-management',
},
{
label: 'Validation',
path: 'guide/forms/signals/validation',
contentPath: 'guide/forms/signals/validation',
},
{
label: 'Custom controls',
path: 'guide/forms/signals/custom-controls',
contentPath: 'guide/forms/signals/custom-controls',
},
{
label: 'Comparison with other form systems',
path: 'guide/forms/signals/comparison',
contentPath: 'guide/forms/signals/comparison',
status: 'new',
},
],
},
Expand Down Expand Up @@ -592,6 +605,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
path: 'guide/testing/utility-apis',
contentPath: 'guide/testing/utility-apis',
},
{
label: 'Zone.js Testing Utilities',
path: 'guide/testing/zone-js-testing-utilities',
contentPath: 'guide/testing/zone-js-testing-utilities',
},
{
label: 'Component harnesses overview',
path: 'guide/testing/component-harnesses-overview',
Expand Down Expand Up @@ -1201,6 +1219,7 @@ export const TUTORIALS_SUB_NAVIGATION_DATA: NavigationItem[] = [
LEARN_ANGULAR_TUTORIAL_NAV_DATA,
DEFERRABLE_VIEWS_TUTORIAL_NAV_DATA,
SIGNALS_TUTORIAL_NAV_DATA,
SIGNAL_FORMS_TUTORIAL_NAV_DATA,
{
path: DEFAULT_PAGES.TUTORIALS,
contentPath: 'tutorials/home',
Expand Down
25 changes: 22 additions & 3 deletions adev-ja/src/app/routing/sub-navigation-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import FIRST_APP_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/first-app
import LEARN_ANGULAR_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/learn-angular/routes.json';
import DEFERRABLE_VIEWS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/deferrable-views/routes.json';
import SIGNALS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/signals/routes.json';
import SIGNAL_FORMS_TUTORIAL_NAV_DATA from '../../../src/assets/tutorials/signal-forms/routes.json';
import ERRORS_NAV_DATA from '../../../src/assets/content/reference/errors/routes.json';
import EXT_DIAGNOSTICS_NAV_DATA from '../../../src/assets/content/reference/extended-diagnostics/routes.json';

Expand Down Expand Up @@ -435,19 +436,31 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
label: '概要',
path: 'guide/forms/signals/overview',
contentPath: 'guide/forms/signals/overview',
status: 'new',
},
{
label: 'フォームモデル',
path: 'guide/forms/signals/models',
contentPath: 'guide/forms/signals/models',
status: 'new',
},
{
label: 'フィールド状態管理',
path: 'guide/forms/signals/field-state-management',
contentPath: 'guide/forms/signals/field-state-management',
},
{
label: 'バリデーション',
path: 'guide/forms/signals/validation',
contentPath: 'guide/forms/signals/validation',
},
{
label: 'カスタムコントロール',
path: 'guide/forms/signals/custom-controls',
contentPath: 'guide/forms/signals/custom-controls',
},
{
label: '他のフォームシステムとの比較',
path: 'guide/forms/signals/comparison',
contentPath: 'guide/forms/signals/comparison',
status: 'new',
},
],
},
Expand Down Expand Up @@ -592,6 +605,11 @@ const DOCS_SUB_NAVIGATION_DATA: NavigationItem[] = [
path: 'guide/testing/utility-apis',
contentPath: 'guide/testing/utility-apis',
},
{
label: 'Zone.jsテストユーティリティ',
path: 'guide/testing/zone-js-testing-utilities',
contentPath: 'guide/testing/zone-js-testing-utilities',
},
{
label: 'コンポーネントハーネスの概要',
path: 'guide/testing/component-harnesses-overview',
Expand Down Expand Up @@ -1201,6 +1219,7 @@ export const TUTORIALS_SUB_NAVIGATION_DATA: NavigationItem[] = [
LEARN_ANGULAR_TUTORIAL_NAV_DATA,
DEFERRABLE_VIEWS_TUTORIAL_NAV_DATA,
SIGNALS_TUTORIAL_NAV_DATA,
SIGNAL_FORMS_TUTORIAL_NAV_DATA,
{
path: DEFAULT_PAGES.TUTORIALS,
contentPath: 'tutorials/home',
Expand Down
3 changes: 3 additions & 0 deletions adev-ja/src/content/best-practices/style-guide.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,15 @@ Prefer `class` and `style` bindings over using the [`NgClass`](/api/common/NgCla
```html
<!-- PREFER -->
<div [class.admin]="isAdmin" [class.dense]="density === 'high'">
<div [style.color]="textColor" [style.background-color]="backgroundColor">
<!-- OR -->
<div [class]="{admin: isAdmin, dense: density === 'high'}">
<div [style]="{'color': textColor, 'background-color': backgroundColor}">


<!-- AVOID -->
<div [ngClass]="{admin: isAdmin, dense: density === 'high'}">
<div [ngStyle]="{'color': textColor, 'background-color': backgroundColor}">
```

Both `class` and `style` bindings use a more straightforward syntax that aligns closely with
Expand Down
33 changes: 27 additions & 6 deletions adev-ja/src/content/guide/aria/overview.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,31 @@ npm install @angular/aria

For example, let's take a toolbar menu. While it may appear to be a "simple" row of buttons tied with specific logic, keyboard navigation and screen readers add a lot of unexpected complexity to those unfamiliar with accessibility.

```
<!------------------------------------->
<!-- INSERT EMBEDDED DEMO OF TOOLBAR -->
<!------------------------------------->
```
<docs-tab-group>
<docs-tab label="Basic">
<docs-code-multifile preview hideCode path="adev/src/content/examples/aria/toolbar/src/basic/app/app.ts">
<docs-code header="app.ts" path="adev/src/content/examples/aria/toolbar/src/basic/app/app.ts"/>
<docs-code header="app.html" path="adev/src/content/examples/aria/toolbar/src/basic/app/app.html"/>
<docs-code header="app.css" path="adev/src/content/examples/aria/toolbar/src/basic/app/app.css"/>
</docs-code-multifile>
</docs-tab>

<docs-tab label="Material">
<docs-code-multifile preview hideCode path="adev/src/content/examples/aria/toolbar/src/basic/material/app/app.ts">
<docs-code header="app.ts" path="adev/src/content/examples/aria/toolbar/src/basic/material/app/app.ts"/>
<docs-code header="app.html" path="adev/src/content/examples/aria/toolbar/src/basic/material/app/app.html"/>
<docs-code header="app.css" path="adev/src/content/examples/aria/toolbar/src/basic/material/app/app.css"/>
</docs-code-multifile>
</docs-tab>

<docs-tab label="Retro">
<docs-code-multifile preview hideCode path="adev/src/content/examples/aria/toolbar/src/basic/retro/app/app.ts">
<docs-code header="app.ts" path="adev/src/content/examples/aria/toolbar/src/basic/retro/app/app.ts"/>
<docs-code header="app.html" path="adev/src/content/examples/aria/toolbar/src/basic/retro/app/app.html"/>
<docs-code header="app.css" path="adev/src/content/examples/aria/toolbar/src/basic/retro/app/app.css"/>
</docs-code-multifile>
</docs-tab>
</docs-tab-group>

In this one scenario, developers need to consider:

Expand All @@ -42,6 +62,7 @@ Angular Aria includes directives for common interactive patterns:
| [Grid](guide/aria/grid) | Two-dimensional data display with cell-by-cell keyboard navigation |
| [Listbox](guide/aria/listbox) | Single or multi-select option lists with keyboard navigation |
| [Menu](guide/aria/menu) | Dropdown menus with nested submenus and keyboard shortcuts |
| [Menubar](guide/aria/menubar) | Horizontal navigation bar for persistent application menus. |
| [Multiselect](guide/aria/multiselect) | Multiple-selection dropdown pattern with compact display |
| [Select](guide/aria/select) | Single-selection dropdown pattern with keyboard navigation |
| [Tabs](guide/aria/tabs) | Tabbed interfaces with automatic or manual activation modes |
Expand All @@ -63,7 +84,7 @@ Angular Aria works well when you need accessible interactive components that are
Angular Aria might not fit every scenario:

- **Pre-styled components** - If you need components that look complete without custom styling, use Angular Material instead
- **Simple forms** - Native HTML form controls like <button> and <input type="radio"> provide built-in accessibility for straightforward use cases
- **Simple forms** - Native HTML form controls like `<button>` and `<input type="radio">` provide built-in accessibility for straightforward use cases
- **Rapid prototyping** - When validating concepts quickly, pre-styled component libraries reduce initial development time

## Next steps
Expand Down
13 changes: 7 additions & 6 deletions adev-ja/src/content/guide/components/lifecycle.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,20 @@ mapping each component input name to a `SimpleChange` object. Each `SimpleChange
input's previous value, its current value, and a flag for whether this is the first time the input
has changed.

You can optionally pass the current class or this as the first generic argument for stronger type checking.

```ts
@Component({
/* ... */
})
export class UserProfile {
name = input('');

ngOnChanges(changes: SimpleChanges) {
for (const inputName in changes) {
const inputValues = changes[inputName];
console.log(`Previous ${inputName} == ${inputValues.previousValue}`);
console.log(`Current ${inputName} == ${inputValues.currentValue}`);
console.log(`Is first ${inputName} change == ${inputValues.firstChange}`);
ngOnChanges(changes: SimpleChanges<UserProfile>) {
if (changes.name) {
console.log(`Previous: ${changes.name.previousValue}`);
console.log(`Current: ${changes.name.currentValue}`);
console.log(`Is first ${changes.name.firstChange}`);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions adev-ja/src/content/guide/testing/services.en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Testing services

NOTE: While this guide is being updated for Vitest, some code examples currently use Karma/Jasmine syntax and APIs. We are actively working to provide Vitest equivalents where applicable.

To check that your services are working as you intend, you can write tests specifically for them.

Services are often the smoothest files to unit test.
Expand Down
Loading