Skip to content

Commit bf58cd3

Browse files
committed
feat: Angular 21
1 parent c289b4a commit bf58cd3

File tree

16 files changed

+19114
-13856
lines changed

16 files changed

+19114
-13856
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

apps/nativescript-demo-ng/package.json

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

apps/nativescript-demo-ng/project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
"executor": "@nativescript/nx:test",
5454
"outputs": ["{workspaceRoot}/coverage/apps/nativescript-demo-ng"],
5555
"options": {
56-
"coverage": false
56+
"coverage": false,
57+
"flags": "--env.commonjs"
5758
},
5859
"configurations": {}
5960
}

apps/nativescript-demo-ng/src/app/item/item-detail.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { NativeScriptCommonModule } from '@nativescript/angular';
1212
schemas: [NO_ERRORS_SCHEMA],
1313
})
1414
export class ItemDetailComponent implements OnInit {
15-
item: Item;
15+
item: Item | null = null;
1616
private itemService = inject(ItemService);
1717
private route = inject(ActivatedRoute);
1818

apps/nativescript-demo-ng/src/app/item/items.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { ModalDialogService, NativeDialogService, NativeScriptCommonModule } fro
1313
schemas: [NO_ERRORS_SCHEMA],
1414
})
1515
export class ItemsComponent implements OnInit, OnDestroy {
16-
message = 'Hello Angular 20.0.0!';
17-
items: Array<Item>;
16+
message = 'Hello Angular 21.0.0!';
17+
items: Array<Item> = [];
1818
private itemService = inject(ItemService);
1919
private nativeDialog = inject(NativeDialogService);
2020
private modalDialog = inject(ModalDialogService);

apps/nativescript-demo-ng/src/app/item2/item-detail2.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<Label
1515
text="Congrats to the Angular Team!"
1616
textWrap="true"
17-
class="text-center mt-5 font-bold text-3xl text-blue-500"
17+
class="text-center mt-5 font-bold text-3xl text-blue-500 leading-3"
1818
></Label>
1919
<Label
2020
row="1"

apps/nativescript-demo-ng/src/app/item3/items.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export class ItemsComponent implements OnInit, OnDestroy {
2222
private nativeDialog = inject(NativeDialogService);
2323
private modalDialog = inject(ModalDialogService);
2424
private http = inject(HttpClient);
25-
message = 'Hello Angular 20.0.0';
26-
items: Array<Item>;
25+
message = 'Hello Angular 21.0.0';
26+
items: Array<Item> = [];
2727
borderRadius: number;
2828
fontSize: number;
2929

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import {
88
import { Trace } from '@nativescript/core';
99

1010
// import { AppModule } from './app/app.module';
11-
import { withInterceptorsFromDi } from '@angular/common/http';
12-
import { setWindowBackgroundColor } from '@nativescript/core/utils/ios';
11+
import { Utils } from '@nativescript/core';
1312
import { AppComponent } from './app/app.component';
1413
import { routes } from './app/app.routes';
1514
import { provideZonelessChangeDetection } from '@angular/core';
@@ -22,11 +21,11 @@ Trace.setCategories('ns-route-reuse-strategy,ns-router');
2221
runNativeScriptAngularApp({
2322
appModuleBootstrap: () => {
2423
if (__APPLE__) {
25-
setWindowBackgroundColor('#a6120d');
24+
Utils.ios.setWindowBackgroundColor('#a6120d');
2625
}
2726
return bootstrapApplication(AppComponent, {
2827
providers: [
29-
provideNativeScriptHttpClient(withInterceptorsFromDi()),
28+
provideNativeScriptHttpClient(),
3029
provideNativeScriptRouter(routes),
3130
ZONELESS ? provideZonelessChangeDetection() : provideNativeScriptNgZone(),
3231
],

apps/nativescript-demo-ng/tsconfig.app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"target": "es2017",
4+
"target": "es2020",
55
"baseUrl": ".",
66
"outDir": "../../dist/out-tsc",
77
"paths": {

apps/nativescript-demo-ng/tsconfig.spec.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": "./tsconfig.json",
33
"compilerOptions": {
4-
"target": "es2017",
4+
"target": "es2020",
55
"baseUrl": ".",
66
"outDir": "../../dist/out-tsc",
77
"paths": {

0 commit comments

Comments
 (0)