Skip to content

Commit 308b3b5

Browse files
authored
feat: Angular 17 support (#124)
1 parent 1e5e864 commit 308b3b5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+5718
-6679
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ Thumbs.db
4646

4747
.angular
4848
/.env
49+
50+
.nx/cache

.prettierignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
**/apps/*nativescript/tools/**/*
1818
**/apps/*nativescript/src/assets/*.css
1919
**/xplat/nativescript/scss/fonticons/*.css
20-
**/xplat/nativescript*/plugins/**/*
20+
**/xplat/nativescript*/plugins/**/*
21+
/.nx/cache

apps/nativescript-demo-ng/.eslintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"prefix": "",
2525
"style": "kebab-case"
2626
}
27-
]
27+
],
28+
"@typescript-eslint/no-explicit-any": "warn",
29+
"@typescript-eslint/no-unused-vars": "warn"
2830
}
2931
},
3032
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<color name="ns_primary">#F5F5F5</color>
4-
<color name="ns_primaryDark">#757575</color>
4+
<color name="ns_primaryDark">#a6120d</color>
55
<color name="ns_accent">#33B5E5</color>
66
<color name="ns_blue">#272734</color>
77
</resources>

apps/nativescript-demo-ng/nativescript.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default {
1111
discardUncaughtJsExceptions: true,
1212
},
1313
ios: {
14-
discardUncaughtJsExceptions: true,
14+
discardUncaughtJsExceptions: false,
1515
},
1616
appPath: 'src',
1717
cli: {

apps/nativescript-demo-ng/package.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22
"name": "demong",
33
"main": "./src/main.ts",
44
"description": "NativeScript Application",
5-
"scripts": {
6-
"postinstall": "node ./tools/xplat-postinstall.js"
7-
},
85
"dependencies": {
96
"@nativescript/core": "file:../../node_modules/@nativescript/core",
10-
"@nativescript-community/ui-material-bottom-navigation": "^7.1.3"
7+
"@nativescript-community/ui-material-bottom-navigation": "^7.2.0"
118
},
129
"devDependencies": {
13-
"@nativescript/android": "~8.5.0",
14-
"@nativescript/ios": "~8.5.0",
10+
"@nativescript/android": "~8.6.0",
11+
"@nativescript/ios": "~8.6.0",
1512
"@nativescript/unit-test-runner": "^3.0.1"
1613
}
1714
}

apps/nativescript-demo-ng/project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
}
6666
},
6767
"lint": {
68-
"executor": "@nx/linter:eslint",
68+
"executor": "@nx/eslint:lint",
6969
"options": {
7070
"lintFilePatterns": ["apps/nativescript-demo-ng/**/*.ts", "apps/nativescript-demo-ng/src/**/*.html"]
7171
}
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
11
/* eslint-disable @typescript-eslint/triple-slash-reference */
2-
/// <reference path="../../node_modules/@nativescript/types-ios/index.d.ts" />
3-
/// <reference path="../../node_modules/@nativescript/types-android/lib/android-29.d.ts" />
4-
5-
declare namespace NodeJS {
6-
interface Global {
7-
__runtimeVersion: any;
8-
TNS_ENV: string;
9-
}
10-
}
2+
/// <reference path="../../references.d.ts" />

apps/nativescript-demo-ng/src/app.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ refer to http://docs.nativescript.org/ui/theme.
1212
@import '@nativescript/theme/css/core.css';
1313
@import '@nativescript/theme/css/default.css';
1414

15+
Button {
16+
border: 0;
17+
background-color: transparent;
18+
text-transform: none;
19+
min-width: 0;
20+
min-height: 0;
21+
android-elevation: 0;
22+
android-dynamic-elevation-offset: 0;
23+
color: #fff;
24+
}
25+
1526
.h1 {
1627
font-weight: bold;
1728
margin: 10 0 0;

apps/nativescript-demo-ng/src/app/app-routing.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { NgModule } from '@angular/core';
2-
import { NativeScriptRouterModule, NSEmptyOutletComponent } from '@nativescript/angular';
32
import { Routes } from '@angular/router';
3+
import { NativeScriptRouterModule } from '@nativescript/angular';
44

5-
import { ItemsComponent } from './item/items.component';
65
import { ItemDetailComponent } from './item/item-detail.component';
6+
import { ItemsComponent } from './item/items.component';
77
// import { HomeComponent } from './home/home.component';
88
// import { BootGuardService } from './boot-guard.service';
99

@@ -21,7 +21,7 @@ const routes: Routes = [
2121
// {
2222
// path: 'home',
2323
// component: HomeComponent,
24-
// canActivate: [BootGuardService],
24+
// canActivate: [() => Promise.resolve(true)],
2525
// children: [
2626
// {
2727
// path: 'start',

0 commit comments

Comments
 (0)