Skip to content

Commit 9d59614

Browse files
committed
fix: angular templates
1 parent 2b56508 commit 9d59614

File tree

8 files changed

+42
-19
lines changed

8 files changed

+42
-19
lines changed

packages/template-blank-ng/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"main": "src/main.ts",
44
"displayName": "Blank",
55
"templateType": "App template",
6-
"version": "8.8.3",
6+
"version": "8.8.4",
77
"description": "Blank template for NativeScript apps using Angular",
88
"author": "NativeScript Team <[email protected]>",
99
"license": "Apache-2.0",
@@ -49,16 +49,17 @@
4949
"@angular/router": "~19.0.0",
5050
"@nativescript/angular": "^19.0.0",
5151
"@nativescript/core": "~8.8.0",
52-
"@nativescript/theme": "^3.1.0",
5352
"rxjs": "~7.8.0",
5453
"zone.js": "~0.15.0"
5554
},
5655
"devDependencies": {
5756
"@angular-devkit/build-angular": "~19.0.0",
5857
"@angular/compiler-cli": "~19.0.0",
58+
"@nativescript/tailwind": "^2.1.0",
5959
"@nativescript/types": "~8.8.0",
6060
"@nativescript/webpack": "~5.0.0",
6161
"@ngtools/webpack": "~19.0.0",
62+
"tailwindcss": "~3.4.0",
6263
"typescript": "~5.6.0"
6364
}
6465
}
+3-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import '@nativescript/theme/css/core.css';
2-
@import '@nativescript/theme/css/default.css';
3-
4-
/* Place any CSS rules you want to apply on both iOS and Android here.
5-
This is where the vast majority of your CSS code goes. */
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

packages/template-blank-ng/src/app/home/home.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
<GridLayout>
66
<!-- Add your page content here -->
7-
<Label text="Hello"></Label>
7+
<Label text="Hello" class="text-lg text-center"></Label>
88
</GridLayout>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ['./src/**/*.{css,xml,html,vue,svelte,ts,tsx}'],
4+
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
5+
darkMode: ['class', '.ns-dark'],
6+
theme: {
7+
extend: {},
8+
},
9+
plugins: [],
10+
corePlugins: {
11+
preflight: false, // disables browser-specific resets
12+
},
13+
}

packages/template-hello-world-ng/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@nativescript/template-hello-world-ng",
33
"main": "./src/main.ts",
4-
"version": "8.8.3",
4+
"version": "8.8.4",
55
"author": "NativeScript Team <[email protected]>",
66
"description": "NativeScript Angular Hello World template",
77
"license": "Apache-2.0",
@@ -43,16 +43,17 @@
4343
"@angular/router": "~19.0.0",
4444
"@nativescript/angular": "^19.0.0",
4545
"@nativescript/core": "~8.8.0",
46-
"@nativescript/theme": "^3.1.0",
4746
"rxjs": "~7.8.0",
4847
"zone.js": "~0.15.0"
4948
},
5049
"devDependencies": {
5150
"@angular-devkit/build-angular": "~19.0.0",
5251
"@angular/compiler-cli": "~19.0.0",
52+
"@nativescript/tailwind": "^2.1.0",
5353
"@nativescript/types": "~8.8.0",
5454
"@nativescript/webpack": "~5.0.0",
5555
"@ngtools/webpack": "~19.0.0",
56-
"typescript": "~5.4.0"
56+
"tailwindcss": "~3.4.0",
57+
"typescript": "~5.6.0"
5758
}
5859
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
@import '@nativescript/theme/css/core.css';
2-
@import '@nativescript/theme/css/default.css';
3-
4-
Button.-primary {
5-
font-size: 18;
6-
}
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;

packages/template-hello-world-ng/src/app/item/item-detail.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import { Item } from './item'
55
import { ItemService } from './item.service'
66

77
@Component({
8-
selector: 'ns-detail',
9-
templateUrl: './detail.component.html',
8+
selector: 'ns-item-detail',
9+
templateUrl: './item-detail.component.html',
1010
imports: [NativeScriptCommonModule],
1111
schemas: [NO_ERRORS_SCHEMA],
1212
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/** @type {import('tailwindcss').Config} */
2+
module.exports = {
3+
content: ['./src/**/*.{css,xml,html,vue,svelte,ts,tsx}'],
4+
// use the .ns-dark class to control dark mode (applied by NativeScript) - since 'media' (default) is not supported.
5+
darkMode: ['class', '.ns-dark'],
6+
theme: {
7+
extend: {},
8+
},
9+
plugins: [],
10+
corePlugins: {
11+
preflight: false, // disables browser-specific resets
12+
},
13+
}

0 commit comments

Comments
 (0)