Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
c757dff
feat: update origin to 21.0.0
lacolaco Nov 19, 2025
74ba311
fix: migrate new files
lacolaco Nov 19, 2025
3204e1e
fix: migrate untranslated files
lacolaco Nov 19, 2025
e5cd5dd
fix: migrate contents /ai
lacolaco Nov 20, 2025
a382ee7
fix: migrate contents /introduction
lacolaco Nov 20, 2025
92f0fb2
fix: migrate contents /best-practices
lacolaco Nov 20, 2025
7f3d13a
fix: migrate contents /ecosystem
lacolaco Nov 20, 2025
435b3d5
fix: migrate contents /animations
lacolaco Nov 20, 2025
3ae2d28
fix: migrate contents /components
lacolaco Nov 20, 2025
9c279e9
fix: migrate contents /di
lacolaco Nov 20, 2025
49062d8
fix: migrate contents /directives
lacolaco Nov 20, 2025
ca8f48e
fix: migrate contents /forms
lacolaco Nov 20, 2025
8f071ba
fix: migrate contents /http
lacolaco Nov 20, 2025
4c2e495
fix: migrate contents /signals
lacolaco Nov 20, 2025
e7ae600
fix: migrate contents /routing
lacolaco Nov 20, 2025
62c3542
fix: migrate contents /templates
lacolaco Nov 20, 2025
9b08118
fix: migrate contents /testing
lacolaco Nov 20, 2025
89b8d10
fix: migrate contents
lacolaco Nov 20, 2025
fd1fda9
fix: migrate contents /performance
lacolaco Nov 20, 2025
b4a5e97
fix: migrate contents
lacolaco Nov 20, 2025
98c5d92
fix: migrate contents /errors
lacolaco Nov 20, 2025
275098b
fix: migrate contents /configs
lacolaco Nov 20, 2025
152328d
fix: migrate contents /references
lacolaco Nov 20, 2025
81a94fa
fix: migrate contents /tools/cli
lacolaco Nov 20, 2025
b0b63be
fix: migrate contents /tutorials/deferrable-views
lacolaco Nov 20, 2025
4fc4d50
fix: migrate contents /tutorials/home
lacolaco Nov 20, 2025
2028172
fix: migrate contents /tutorials
lacolaco Nov 20, 2025
b6a240f
fix(docs): migrate translated markdown files to match origin 21.0.0
lacolaco Nov 20, 2025
02dec43
fix: migrate cookie-popup
lacolaco Nov 20, 2025
21e1cac
fix(docs): migrate translated source code files to match origin 21.0.0
lacolaco Nov 20, 2025
e68fbf5
fix: update git patches for origin 21.0.0
lacolaco Nov 20, 2025
2abd5d6
fix: resolve textlint errors
lacolaco Nov 20, 2025
35294d8
refactor: migrate index.html and title strategy from patch to localiz…
lacolaco Nov 20, 2025
3cc470d
fix: add patch for header.service.ts canonical host
lacolaco Nov 20, 2025
66aba95
fix: add explicit anchor IDs to section headings in releases.md
lacolaco Nov 20, 2025
60f2eee
fix: add explicit anchor IDs to section headings in versions.md
lacolaco Nov 20, 2025
c8c1737
fix: add missing anchor IDs to section headings
lacolaco Nov 20, 2025
6adedc5
fix: add anchor ID to NgClass section in directives/overview.md
lacolaco Nov 20, 2025
2c33abf
fix: add explicit anchor ID to providedIn section in dependency-injec…
lacolaco Nov 20, 2025
422bff9
fix: add anchor ID to NgStyle section in directives/overview.md
lacolaco Nov 20, 2025
773cf88
fix: add explicit anchor ID to ApplicationConfig section in dependenc…
lacolaco Nov 20, 2025
7f29bf8
fix: add explicit anchor ID to NgModule section in dependency-injecti…
lacolaco Nov 20, 2025
a768d60
fix: add anchor ID to syntax reference section in structural-directiv…
lacolaco Nov 20, 2025
40b1605
fix: add anchor ID to reactive forms data flow section in forms/overv…
lacolaco Nov 20, 2025
bac3ef7
fix: add anchor ID to template-driven forms data flow section in form…
lacolaco Nov 20, 2025
f38f611
fix: add missing anchor IDs and fix link in image-optimization.md
lacolaco Nov 20, 2025
1535e3e
fix: add missing anchor ID to components-scenarios.md
lacolaco Nov 20, 2025
ca92b79
fix: add missing anchor ID for spy stub section in components-scenari…
lacolaco Nov 20, 2025
80f3a22
fix: add all missing anchor IDs to components-scenarios.md
lacolaco Nov 20, 2025
cd305c9
fix: add all missing anchor IDs to utility-apis.md
lacolaco Nov 20, 2025
ed13f99
chore: remove deprecated documentation files
lacolaco Nov 20, 2025
6b13d0a
fix(docs): add anchor IDs to all headings in dynamic-forms.md
lacolaco Nov 20, 2025
6329d0b
fix: correct wording from "AI重視" to "AI志向" in home.component.html
lacolaco Nov 20, 2025
311f2db
fix(ci): separate bazel disk-cache per workflow
lacolaco Nov 20, 2025
06db1ba
fix: update wording from "自信を持って出荷" to "自信を持ってデプロイ" in what-is-angula…
lacolaco Nov 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/adev-preview-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- uses: bazel-contrib/setup-bazel@4fd964a13a440a8aeb0be47350db2fc640f19ca8 # 0.15.0
with:
bazelisk-cache: true
disk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelrc: |
# Print all the options that apply to the build.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/adev-production-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: bazel-contrib/setup-bazel@4fd964a13a440a8aeb0be47350db2fc640f19ca8 # 0.15.0
with:
bazelisk-cache: true
disk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
bazelrc: |
# Print all the options that apply to the build.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- uses: bazel-contrib/setup-bazel@4fd964a13a440a8aeb0be47350db2fc640f19ca8 # 0.15.0
with:
bazelisk-cache: true
disk-cache: true
disk-cache: ${{ github.workflow }}
repository-cache: true
- run: pnpm install
- run: pnpm run build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
@if (!hasAccepted()) {
<div class="docs-cookies-popup docs-invert-mode">
<p>This site uses cookies from Google to deliver its services and to analyze traffic.</p>
<div class="docs-cookies-popup docs-invert-mode">
<p>This site uses cookies from Google to deliver its services and to analyze traffic.</p>

<div>
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">
<button type="button" class="docs-primary-btn" [attr.text]="'Learn more'" aria-label="Learn More">
<div>
<a
href="https://policies.google.com/technologies/cookies"
target="_blank"
rel="noopener"
class="docs-primary-btn"
aria-label="Learn more about how Google uses cookies"
text="Learn more"
>
Learn more
</a>

<button
type="button"
(click)="accept()"
class="docs-primary-btn"
text="Ok, Got it"
aria-label="Ok, Got it"
>
Ok, Got it
</button>
</a>
<button
type="button"
(click)="accept()"
class="docs-primary-btn"
[attr.text]="'Ok, Got it'"
aria-label="Ok, Got it"
>
Ok, Got it
</button>
</div>
</div>
</div>
}
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
@if (!hasAccepted()) {
<div class="docs-cookies-popup docs-invert-mode">
<p>このサイトでは、サービスの提供とトラフィックの分析のためにGoogleのクッキーを使用しています。</p>
<div class="docs-cookies-popup docs-invert-mode">
<p>このサイトでは、サービスの提供とトラフィックの分析のためにGoogleのクッキーを使用しています。</p>

<div>
<a href="https://policies.google.com/technologies/cookies" target="_blank" rel="noopener">
<button type="button" class="docs-primary-btn" [attr.text]="'詳細を見る'" aria-label="詳細を見る">
<div>
<a
href="https://policies.google.com/technologies/cookies"
target="_blank"
rel="noopener"
class="docs-primary-btn"
aria-label="Googleのクッキー使用方法の詳細を見る"
text="詳細を見る"
>
詳細を見る
</a>

<button
type="button"
(click)="accept()"
class="docs-primary-btn"
text="了解しました"
aria-label="了解しました"
>
了解しました
</button>
</a>
<button
type="button"
(click)="accept()"
class="docs-primary-btn"
[attr.text]="'了解しました'"
aria-label="了解しました"
>
了解しました
</button>
</div>
</div>
</div>
}
60 changes: 60 additions & 0 deletions adev-ja/src/app/core/services/a-dev-title-strategy.en.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/

import {Injectable, inject} from '@angular/core';
import {NavigationItem} from '@angular/docs';
import {Meta, Title} from '@angular/platform-browser';
import {ActivatedRouteSnapshot, RouterStateSnapshot, TitleStrategy} from '@angular/router';

export const ROUTE_TITLE_PROPERTY = 'label';
export const ROUTE_PARENT_PROPERTY = 'parent';
export const TITLE_SUFFIX = 'Angular';
export const TITLE_SEPARATOR = ' • ';
export const DEFAULT_PAGE_TITLE = 'Overview';

export const TITLE_OG_META_TAG = 'og:title';
export const TITLE_TWITTER_META_TAG = 'twitter:title';

export const ALL_TITLE_META_TAGS = [TITLE_OG_META_TAG, TITLE_TWITTER_META_TAG];

@Injectable({providedIn: 'root'})
export class ADevTitleStrategy extends TitleStrategy {
private readonly title = inject(Title);
private readonly meta = inject(Meta);

constructor() {
super();
}

override updateTitle(routerState: RouterStateSnapshot) {
const title = this.buildTitle(routerState);

if (title !== undefined) {
this.title.setTitle(title);
ALL_TITLE_META_TAGS.forEach((tag) => this.meta.updateTag({property: tag, content: title}));
}
}

override buildTitle(snapshot: RouterStateSnapshot): string {
let route: ActivatedRouteSnapshot = snapshot.root;

while (route.firstChild) {
route = route.firstChild;
}

const data = route.data as NavigationItem;
const routeTitle = data.label ?? '';

const prefix =
routeTitle.startsWith(DEFAULT_PAGE_TITLE) && data.parent
? `${data.parent.label}${TITLE_SEPARATOR}`
: '';

return !!routeTitle ? `${prefix}${routeTitle}${TITLE_SEPARATOR}${TITLE_SUFFIX}` : TITLE_SUFFIX;
}
}
60 changes: 60 additions & 0 deletions adev-ja/src/app/core/services/a-dev-title-strategy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*!
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/

import {Injectable, inject} from '@angular/core';
import {NavigationItem} from '@angular/docs';
import {Meta, Title} from '@angular/platform-browser';
import {ActivatedRouteSnapshot, RouterStateSnapshot, TitleStrategy} from '@angular/router';

export const ROUTE_TITLE_PROPERTY = 'label';
export const ROUTE_PARENT_PROPERTY = 'parent';
export const TITLE_SUFFIX = 'Angular 日本語版';
export const TITLE_SEPARATOR = ' • ';
export const DEFAULT_PAGE_TITLE = 'Overview';

export const TITLE_OG_META_TAG = 'og:title';
export const TITLE_TWITTER_META_TAG = 'twitter:title';

export const ALL_TITLE_META_TAGS = [TITLE_OG_META_TAG, TITLE_TWITTER_META_TAG];

@Injectable({providedIn: 'root'})
export class ADevTitleStrategy extends TitleStrategy {
private readonly title = inject(Title);
private readonly meta = inject(Meta);

constructor() {
super();
}

override updateTitle(routerState: RouterStateSnapshot) {
const title = this.buildTitle(routerState);

if (title !== undefined) {
this.title.setTitle(title);
ALL_TITLE_META_TAGS.forEach((tag) => this.meta.updateTag({property: tag, content: title}));
}
}

override buildTitle(snapshot: RouterStateSnapshot): string {
let route: ActivatedRouteSnapshot = snapshot.root;

while (route.firstChild) {
route = route.firstChild;
}

const data = route.data as NavigationItem;
const routeTitle = data.label ?? '';

const prefix =
routeTitle.startsWith(DEFAULT_PAGE_TITLE) && data.parent
? `${data.parent.label}${TITLE_SEPARATOR}`
: '';

return !!routeTitle ? `${prefix}${routeTitle}${TITLE_SEPARATOR}${TITLE_SUFFIX}` : TITLE_SUFFIX;
}
}
14 changes: 9 additions & 5 deletions adev-ja/src/app/features/home/home.component.en.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<div class="adev-home" #home>
<main class="adev-home" #home>
<div class="banners-layer layer">
<div class="adev-banner-container">
<a href="https://goo.gle/angular-ai-update" class="adev-banner" target="_blank">
<h1 tabindex="-1">Available Now:</h1>
<p class="adev-banner-cta">Angular AI Developer Event Replay</p>
<a
href="events/v21"
class="adev-banner"
target="_blank"
>
<h1 tabindex="-1">Angular v21 is here!</h1>
<p class="adev-banner-cta">🕹️ Start your adventure</p>
</a>
</div>
</div>
Expand Down Expand Up @@ -486,4 +490,4 @@ <h3>Are you an LLM or curious about AI in Angular?</h3>
</div>
</div>
</section>
</div>
</main>
16 changes: 10 additions & 6 deletions adev-ja/src/app/features/home/home.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<div class="adev-home" #home>
<main class="adev-home" #home>
<div class="banners-layer layer">
<div class="adev-banner-container">
<a href="https://goo.gle/angular-ai-update" class="adev-banner" target="_blank">
<h1 tabindex="-1">最新情報:</h1>
<p class="adev-banner-cta">Angular AI Developer Event Replay</p>
<a
href="events/v21"
class="adev-banner"
target="_blank"
>
<h1 tabindex="-1">Angular v21がリリースされました!</h1>
<p class="adev-banner-cta">🕹️ 冒険を始めよう</p>
</a>
</div>
</div>
Expand Down Expand Up @@ -111,7 +115,7 @@ <h2>開発効率とスケーラビリティを両立</h2>
</g>
</g>
</svg>
<h3>AI重視</h3>
<h3>AI志向</h3>
<p>AIで開発を加速させるリソースと統合機能が充実</p>
</div>
<div class="feature">
Expand Down Expand Up @@ -484,4 +488,4 @@ <h3>AIとAngularの組み合わせに興味がありますか?</h3>
</div>
</div>
</section>
</div>
</main>
8 changes: 8 additions & 0 deletions adev-ja/src/app/features/update/recommendations.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2742,4 +2742,12 @@ export const RECOMMENDATIONS: Step[] = [
action:
'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.',
},
{
possibleIn: 2000,
necessaryAsOf: 2000,
level: ApplicationComplexity.Advanced,
step: '20.0.0_router_generate_error_redirectTo_and_canMatch_incompatible_together',
action:
'Route configurations are now validated more rigorously. Routes that combine `redirectTo` and `canMatch` protections will generate an error, as these properties are incompatible together by default.',
},
];
8 changes: 8 additions & 0 deletions adev-ja/src/app/features/update/recommendations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2742,4 +2742,12 @@ export const RECOMMENDATIONS: Step[] = [
action:
'テンプレートでは括弧が常に尊重されるようになりました。これは、null合体演算子が括弧内にネストされている場合にランタイムエラーを引き起こす可能性があります。例:`(foo?.bar).baz`は、`foo`がnullishの場合、ネイティブJavaScriptと同様にエラーを投げます。',
},
{
possibleIn: 2000,
necessaryAsOf: 2000,
level: ApplicationComplexity.Advanced,
step: '20.0.0_router_generate_error_redirectTo_and_canMatch_incompatible_together',
action:
'ルート設定がより厳密に検証されるようになりました。`redirectTo`と`canMatch`保護を組み合わせたルートはエラーを生成します。これらのプロパティはデフォルトで互いに互換性がないためです。',
},
];
26 changes: 11 additions & 15 deletions adev-ja/src/app/features/update/update.component.en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.dev/license
*/

import {ChangeDetectionStrategy, Component, HostListener, inject, signal} from '@angular/core';
import {ChangeDetectionStrategy, Component, inject, signal} from '@angular/core';
import {Step, RECOMMENDATIONS} from './recommendations';
import {Clipboard} from '@angular/cdk/clipboard';
import {CdkMenuModule} from '@angular/cdk/menu';
Expand All @@ -26,6 +26,8 @@ interface Option {
description: string;
}

const isWindows = typeof window !== 'undefined' && window.navigator.userAgent.includes('Windows');

@Component({
selector: 'adev-update-guide',
templateUrl: './update.component.html',
Expand All @@ -40,6 +42,9 @@ interface Option {
IconComponent,
],
changeDetection: ChangeDetectionStrategy.OnPush,
host: {
'(click)': 'copyCode($event)',
},
})
export default class UpdateComponent {
private readonly snackBar = inject(MatSnackBar);
Expand All @@ -50,7 +55,7 @@ export default class UpdateComponent {
protected options: Record<string, boolean> = {
ngUpgrade: false,
material: false,
windows: isWindows(),
windows: isWindows,
};

protected readonly optionList: Option[] = [
Expand Down Expand Up @@ -128,8 +133,9 @@ export default class UpdateComponent {
}
}

@HostListener('click', ['$event.target'])
copyCode({tagName, textContent}: Element) {
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 Expand Up @@ -247,7 +253,7 @@ export default class UpdateComponent {
if (this.to.number < 600) {
const actionMessage = `Update all of your dependencies to the latest Angular and the right version of TypeScript.`;

if (isWindows()) {
if (isWindows) {
const packages =
angularPackages
.map((packageName) => `@angular/${packageName}@${angularVersion}`)
Expand Down Expand Up @@ -297,13 +303,3 @@ export default class UpdateComponent {
return newAction;
}
}

/** Whether or not the user is running on a Windows OS. */
function isWindows(): boolean {
if (typeof navigator === 'undefined') {
return false;
}

const platform = navigator.platform.toLowerCase();
return platform.includes('windows') || platform.includes('win32');
}
Loading