Skip to content

Commit 1c61745

Browse files
committed
feat: Angular 20
1 parent d0aca50 commit 1c61745

File tree

3 files changed

+15
-41
lines changed

3 files changed

+15
-41
lines changed

apps/nativescript-starter-angular/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,29 @@
44
"version": "1.0.0",
55
"private": true,
66
"dependencies": {
7-
"@angular/animations": "~19.2.0",
8-
"@angular/common": "~19.2.0",
9-
"@angular/compiler": "~19.2.0",
10-
"@angular/core": "~19.2.0",
11-
"@angular/forms": "~19.2.0",
12-
"@angular/platform-browser": "~19.2.0",
13-
"@angular/platform-browser-dynamic": "~19.2.0",
14-
"@angular/router": "~19.2.0",
15-
"@nativescript/angular": "^19.0.0",
7+
"@angular/animations": "~20.0.0",
8+
"@angular/common": "~20.0.0",
9+
"@angular/compiler": "~20.0.0",
10+
"@angular/core": "~20.0.0",
11+
"@angular/forms": "~20.0.0",
12+
"@angular/platform-browser": "~20.0.0",
13+
"@angular/platform-browser-dynamic": "~20.0.0",
14+
"@angular/router": "~20.0.0",
15+
"@nativescript/angular": "^20.0.0",
1616
"@nativescript/core": "~8.9.0",
1717
"rxjs": "~7.8.0",
1818
"zone.js": "~0.15.0"
1919
},
2020
"devDependencies": {
21-
"@angular-devkit/build-angular": "~19.2.0",
22-
"@angular/compiler-cli": "~19.2.0",
21+
"@angular-devkit/build-angular": "~20.0.0",
22+
"@angular/compiler-cli": "~20.0.0",
2323
"@nativescript/preview-cli": "^1.0.14",
2424
"@nativescript/stackblitz": "^0.0.8",
2525
"@nativescript/tailwind": "^2.1.0",
2626
"@nativescript/types": "~8.9.0",
2727
"@nativescript/webpack": "~5.0.0",
28-
"@ngtools/webpack": "~19.2.0",
28+
"@ngtools/webpack": "~20.0.0",
2929
"tailwindcss": "~3.4.0",
30-
"typescript": "~5.7.0"
30+
"typescript": "~5.8.0"
3131
}
3232
}

apps/nativescript-starter-angular/src/main.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
import {
22
bootstrapApplication,
33
provideNativeScriptHttpClient,
4-
provideNativeScriptNgZone,
54
provideNativeScriptRouter,
65
runNativeScriptAngularApp,
76
} from '@nativescript/angular';
8-
import { provideExperimentalZonelessChangeDetection } from '@angular/core';
7+
import { provideZonelessChangeDetection } from '@angular/core';
98
import { withInterceptorsFromDi } from '@angular/common/http';
109
import { routes } from './app/app.routes';
1110
import { AppComponent } from './app/app.component';
1211

13-
/**
14-
* Disable zone by setting this to true
15-
* Then also adjust polyfills.ts (see note there)
16-
*/
17-
const EXPERIMENTAL_ZONELESS = false;
18-
1912
runNativeScriptAngularApp({
2013
appModuleBootstrap: () => {
2114
return bootstrapApplication(AppComponent, {
2215
providers: [
2316
provideNativeScriptHttpClient(withInterceptorsFromDi()),
2417
provideNativeScriptRouter(routes),
25-
EXPERIMENTAL_ZONELESS
26-
? provideExperimentalZonelessChangeDetection()
27-
: provideNativeScriptNgZone(),
18+
provideZonelessChangeDetection(),
2819
],
2920
});
3021
},

apps/nativescript-starter-angular/src/polyfills.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,3 @@
66
import '@nativescript/core/globals';
77
// Install @nativescript/angular specific polyfills
88
import '@nativescript/angular/polyfills';
9-
10-
/**
11-
* Disable zone completely by removing the following 3 imports
12-
* alongside also adjusting main.ts to boot zoneless
13-
*/
14-
15-
/**
16-
* Zone.js and patches
17-
*/
18-
// Add pre-zone.js patches needed for the NativeScript platform
19-
import '@nativescript/zone-js/dist/pre-zone-polyfills';
20-
21-
// Zone JS is required by default for Angular itself
22-
import 'zone.js';
23-
24-
// Add NativeScript specific Zone JS patches
25-
import '@nativescript/zone-js';

0 commit comments

Comments
 (0)