Skip to content

Commit 501c8cd

Browse files
committed
feat: Angular 20 rc
1 parent f36f05f commit 501c8cd

File tree

7 files changed

+1063
-772
lines changed

7 files changed

+1063
-772
lines changed

apps/nativescript-demo-ng/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"@nativescript/core": "file:../../node_modules/@nativescript/core"
77
},
88
"devDependencies": {
9-
"@nativescript/android": "~8.8.0",
10-
"@nativescript/ios": "~8.8.0",
9+
"@nativescript/android": "~8.9.0",
10+
"@nativescript/ios": "~8.9.0",
1111
"@nativescript/tailwind": "^2.1.0",
1212
"@nativescript/unit-test-runner": "^3.0.1",
13-
"@nativescript/visionos": "8.8.1"
13+
"@nativescript/visionos": "~8.9.0"
1414
}
1515
}

apps/nativescript-demo-ng/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { withInterceptorsFromDi } from '@angular/common/http';
1212
import { setWindowBackgroundColor } from '@nativescript/core/utils/ios';
1313
import { AppComponent } from './app/app.component';
1414
import { routes } from './app/app.routes';
15-
import { provideExperimentalZonelessChangeDetection } from '@angular/core';
15+
import { provideZoneChangeDetection } from '@angular/core';
1616

1717
const EXPERIMENTAL_ZONELESS = true;
1818

@@ -28,7 +28,7 @@ runNativeScriptAngularApp({
2828
providers: [
2929
provideNativeScriptHttpClient(withInterceptorsFromDi()),
3030
provideNativeScriptRouter(routes),
31-
EXPERIMENTAL_ZONELESS ? provideExperimentalZonelessChangeDetection() : provideNativeScriptNgZone(),
31+
EXPERIMENTAL_ZONELESS ? provideZoneChangeDetection() : provideNativeScriptNgZone(),
3232
],
3333
});
3434
},

apps/nativescript-demo-ng/src/polyfills.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
import '@nativescript/core/globals';
77
// Install @nativescript/angular specific polyfills
88
import '@nativescript/angular/polyfills';
9-
9+
import { AbortController, AbortSignal } from '@nativescript/core/abortcontroller';
10+
(global as any).AbortController = AbortController;
11+
(global as any).AbortSignal = AbortSignal;
1012
/**
1113
* Zone.js and patches
1214
*/
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
const webpack = require('@nativescript/webpack');
2+
const { ProvidePlugin } = require("webpack");
23

34
module.exports = (env) => {
45
webpack.init(env);
56
webpack.useConfig('angular');
67

8+
webpack.chainWebpack((config) => {
9+
config.resolve.set('fallback', {
10+
AbortController: require.resolve('@nativescript/core/abortcontroller'),
11+
AbortSignal: require.resolve('@nativescript/core/abortcontroller'),
12+
});
13+
});
14+
715
return webpack.resolveConfig();
816
};

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,42 +36,42 @@
3636
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
3737
},
3838
"dependencies": {
39-
"@angular/animations": "19.2.9",
40-
"@angular/common": "19.2.9",
41-
"@angular/compiler": "19.2.9",
42-
"@angular/core": "19.2.9",
43-
"@angular/forms": "19.2.9",
44-
"@angular/platform-browser": "19.2.9",
45-
"@angular/platform-browser-dynamic": "19.2.9",
46-
"@angular/router": "19.2.9",
47-
"@nativescript/core": "~8.8.0",
39+
"@angular/animations": "next",
40+
"@angular/common": "next",
41+
"@angular/compiler": "next",
42+
"@angular/core": "next",
43+
"@angular/forms": "next",
44+
"@angular/platform-browser": "next",
45+
"@angular/platform-browser-dynamic": "next",
46+
"@angular/router": "next",
47+
"@nativescript/core": "~8.9.0",
4848
"@nativescript/tailwind": "^2.1.0",
4949
"nativescript-fonticon": "~8.1.3",
5050
"rxjs": "^7.8.0",
5151
"zone.js": "~0.15.0"
5252
},
5353
"devDependencies": {
54-
"@angular-devkit/build-angular": "19.2.9",
55-
"@angular-devkit/core": "19.2.9",
56-
"@angular-devkit/schematics": "19.2.9",
54+
"@angular-devkit/build-angular": "next",
55+
"@angular-devkit/core": "next",
56+
"@angular-devkit/schematics": "next",
5757
"@angular-eslint/eslint-plugin": "19.4.0",
5858
"@angular-eslint/eslint-plugin-template": "19.4.0",
5959
"@angular-eslint/template-parser": "19.4.0",
60-
"@angular/compiler-cli": "19.2.9",
60+
"@angular/compiler-cli": "next",
6161
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
62-
"@nativescript/nx": "20.0.4",
63-
"@nativescript/types": "~8.8.0",
62+
"@nativescript/nx": "~20.8.0",
63+
"@nativescript/types": "~8.9.0",
6464
"@nativescript/unit-test-runner": "^3.0.4",
6565
"@nativescript/webpack": "~5.0.22",
66-
"@ngtools/webpack": "~19.0.0",
66+
"@ngtools/webpack": "next",
6767
"@nx/angular": "21.1.0",
6868
"@nx/eslint": "21.1.0",
6969
"@nx/eslint-plugin": "21.1.0",
7070
"@nx/jest": "21.1.0",
7171
"@nx/js": "21.1.0",
7272
"@nx/node": "21.1.0",
7373
"@nx/workspace": "21.1.0",
74-
"@schematics/angular": "19.2.9",
74+
"@schematics/angular": "next",
7575
"@types/jasmine": "5.1.4",
7676
"@types/jest": "29.5.13",
7777
"@types/node": "^20.0.0",
@@ -108,7 +108,7 @@
108108
"ts-jest": "~29.2.0",
109109
"ts-node": "10.9.2",
110110
"tslib": "^2.8.0",
111-
"typescript": "5.7.3"
111+
"typescript": "~5.8.0"
112112
},
113113
"xplat": {
114114
"prefix": "nativescript",

packages/angular/src/lib/legacy/router/page-router-outlet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import {
1010
EnvironmentInjector,
1111
EventEmitter,
1212
Inject,
13-
InjectFlags,
1413
InjectionToken,
1514
InjectOptions,
1615
Injector,
1716
NgZone,
1817
OnDestroy,
1918
Output,
19+
SkipSelf,
2020
Type,
2121
ViewContainerRef,
2222
} from '@angular/core';
@@ -84,12 +84,12 @@ export class DestructibleInjector implements Injector {
8484
private destructibleProviders: ProviderSet,
8585
private parent: Injector,
8686
) {}
87-
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions | InjectFlags): T {
87+
get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T, flags?: InjectOptions): T {
8888
const ref = this.parent.get(token, notFoundValue, flags);
8989

9090
// if we're skipping ourselves then it's not our responsibility to destroy
9191
if (typeof flags === 'number') {
92-
if (!(flags & InjectFlags.SkipSelf) && this.destructibleProviders.has(token)) {
92+
if (!(flags && this.destructibleProviders.has(token))) {
9393
this.refs.add(ref);
9494
}
9595
} else {

0 commit comments

Comments
 (0)