Skip to content

Commit b2f4175

Browse files
SkyZeroZxkirjs
authored andcommitted
docs: update angular.io links to angular.dev in comments, TSDoc, and warnings
1 parent bcef77d commit b2f4175

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export const RECOMMENDATIONS: Step[] = [
208208
level: ApplicationComplexity.Basic,
209209
step: 'Http',
210210
action:
211-
"If you use the legacy `HttpModule` and the `Http` service, switch to `HttpClientModule` and the `HttpClient` service. HttpClient simplifies the default ergonomics (you don't need to map to JSON anymore) and now supports typed return values and interceptors. Read more on [angular.dev](https://angular.io/guide/http).",
211+
"If you use the legacy `HttpModule` and the `Http` service, switch to `HttpClientModule` and the `HttpClient` service. HttpClient simplifies the default ergonomics (you don't need to map to JSON anymore) and now supports typed return values and interceptors. Read more on [angular.dev](https://angular.dev/guide/http).",
212212
},
213213
{
214214
possibleIn: 430,

packages/forms/src/directives/reactive_errors.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import {ɵRuntimeError as RuntimeError} from '@angular/core';
10-
1110
import {RuntimeErrorCode} from '../errors';
1211

1312
import {
@@ -16,6 +15,7 @@ import {
1615
formGroupNameExample,
1716
ngModelGroupExample,
1817
} from './error_examples';
18+
import {VERSION} from '../version';
1919

2020
export function controlParentException(nameOrIndex: string | number | null): Error {
2121
return new RuntimeError(
@@ -126,16 +126,18 @@ export const asyncValidatorsDroppedWithOptsWarning = `
126126
`;
127127

128128
export function ngModelWarning(directiveName: string): string {
129+
const versionSubDomain = VERSION.major !== '0' ? `v${VERSION.major}.` : '';
130+
129131
return `
130132
It looks like you're using ngModel on the same form field as ${directiveName}.
131133
Support for using the ngModel input property and ngModelChange event with
132134
reactive form directives has been deprecated in Angular v6 and will be removed
133135
in a future version of Angular.
134136
135137
For more information on this, see our API docs here:
136-
https://angular.io/api/forms/${
138+
https://${versionSubDomain}angular.dev/api/forms/${
137139
directiveName === 'formControl' ? 'FormControlDirective' : 'FormControlName'
138-
}#use-with-ngmodel
140+
}
139141
`;
140142
}
141143

packages/language-service/src/codefixes/fix_invalid_banana_in_box.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {getTypeCheckInfoAtPosition, TypeCheckInfo} from '../utils';
1616
import {CodeActionMeta, FixIdForCodeFixesAll} from './utils';
1717

1818
/**
19-
* fix [invalid banana-in-box](https://angular.io/extended-diagnostics/NG8101)
19+
* fix [invalid banana-in-box](https://angular.dev/extended-diagnostics/NG8101)
2020
*/
2121
export const fixInvalidBananaInBoxMeta: CodeActionMeta = {
2222
errorCodes: [ngErrorCode(ErrorCode.INVALID_BANANA_IN_BOX)],

packages/language-service/src/codefixes/fix_missing_required_inputs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright Google LLC All Rights Reserved.
44
*
55
* Use of this source code is governed by an MIT-style license that can be
6-
* found in the LICENSE file at https://angular.io/license
6+
* found in the LICENSE file at https://angular.dev/license
77
*/
88

99
import {

packages/language-service/src/codefixes/fix_unused_standalone_imports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {CodeActionMeta, FixIdForCodeFixesAll} from './utils';
1313
import {findFirstMatchingNode} from '../utils/ts_utils';
1414

1515
/**
16-
* Fix for [unused standalone imports](https://angular.io/extended-diagnostics/NG8113)
16+
* Fix for [unused standalone imports](https://angular.dev/extended-diagnostics/NG8113)
1717
*/
1818
export const fixUnusedStandaloneImportsMeta: CodeActionMeta = {
1919
errorCodes: [ngErrorCode(ErrorCode.UNUSED_STANDALONE_IMPORTS)],

0 commit comments

Comments
 (0)