@nativescript/template-blank-ng 8.8.2 → 8.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "src/main.ts",
4
4
  "displayName": "Blank",
5
5
  "templateType": "App template",
6
- "version": "8.8.2",
6
+ "version": "8.8.4",
7
7
  "description": "Blank template for NativeScript apps using Angular",
8
8
  "author": "NativeScript Team <oss@nativescript.org>",
9
9
  "license": "Apache-2.0",
@@ -39,26 +39,27 @@
39
39
  "url": "https://github.com/NativeScript/NativeScript/issues"
40
40
  },
41
41
  "dependencies": {
42
- "@angular/animations": "~18.0.0",
43
- "@angular/common": "~18.0.0",
44
- "@angular/compiler": "~18.0.0",
45
- "@angular/core": "~18.0.0",
46
- "@angular/forms": "~18.0.0",
47
- "@angular/platform-browser": "~18.0.0",
48
- "@angular/platform-browser-dynamic": "~18.0.0",
49
- "@angular/router": "~18.0.0",
50
- "@nativescript/angular": "^18.0.0",
42
+ "@angular/animations": "~19.0.0",
43
+ "@angular/common": "~19.0.0",
44
+ "@angular/compiler": "~19.0.0",
45
+ "@angular/core": "~19.0.0",
46
+ "@angular/forms": "~19.0.0",
47
+ "@angular/platform-browser": "~19.0.0",
48
+ "@angular/platform-browser-dynamic": "~19.0.0",
49
+ "@angular/router": "~19.0.0",
50
+ "@nativescript/angular": "^19.0.0",
51
51
  "@nativescript/core": "~8.8.0",
52
- "@nativescript/theme": "^3.1.0",
53
52
  "rxjs": "~7.8.0",
54
- "zone.js": "~0.14.0"
53
+ "zone.js": "~0.15.0"
55
54
  },
56
55
  "devDependencies": {
57
- "@angular-devkit/build-angular": "~18.0.0",
58
- "@angular/compiler-cli": "~18.0.0",
56
+ "@angular-devkit/build-angular": "~19.0.0",
57
+ "@angular/compiler-cli": "~19.0.0",
58
+ "@nativescript/tailwind": "^2.1.0",
59
59
  "@nativescript/types": "~8.8.0",
60
60
  "@nativescript/webpack": "~5.0.0",
61
- "@ngtools/webpack": "~18.0.0",
62
- "typescript": "~5.4.0"
61
+ "@ngtools/webpack": "~19.0.0",
62
+ "tailwindcss": "~3.4.0",
63
+ "typescript": "~5.6.0"
63
64
  }
64
65
  }
@@ -1,7 +1,10 @@
1
- import { Component } from '@angular/core'
1
+ import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
2
+ import { PageRouterOutlet } from '@nativescript/angular';
2
3
 
3
4
  @Component({
4
5
  selector: 'ns-app',
5
- templateUrl: 'app.component.html',
6
+ templateUrl: './app.component.html',
7
+ imports: [PageRouterOutlet],
8
+ schemas: [NO_ERRORS_SCHEMA],
6
9
  })
7
10
  export class AppComponent {}
@@ -0,0 +1,6 @@
1
+ import { Routes } from '@angular/router';
2
+
3
+ export const routes: Routes = [
4
+ { path: '', redirectTo: '/home', pathMatch: 'full' },
5
+ { path: 'home', loadComponent: () => import('./home/home.component').then(m => m.HomeComponent) },
6
+ ];
@@ -4,4 +4,5 @@
4
4
 
5
5
  <GridLayout>
6
6
  <!-- Add your page content here -->
7
+ <Label text="Hello" class="text-lg text-center"></Label>
7
8
  </GridLayout>
@@ -1,15 +1,15 @@
1
- import { Component, OnInit } from '@angular/core'
1
+ import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
2
+ import {
3
+ NativeScriptCommonModule,
4
+ NativeScriptRouterModule,
5
+ } from '@nativescript/angular';
2
6
 
3
7
  @Component({
4
8
  selector: 'Home',
5
9
  templateUrl: './home.component.html',
10
+ imports: [NativeScriptCommonModule, NativeScriptRouterModule],
11
+ schemas: [NO_ERRORS_SCHEMA],
6
12
  })
7
- export class HomeComponent implements OnInit {
8
- constructor() {
9
- // Use the component constructor to inject providers.
10
- }
13
+ export class HomeComponent {
11
14
 
12
- ngOnInit(): void {
13
- // Init your component properties here.
14
- }
15
15
  }
package/src/app.css CHANGED
@@ -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;
package/src/main.ts CHANGED
@@ -1,8 +1,31 @@
1
- import { platformNativeScript, runNativeScriptAngularApp } from '@nativescript/angular';
1
+ import {
2
+ bootstrapApplication,
3
+ provideNativeScriptHttpClient,
4
+ provideNativeScriptNgZone,
5
+ provideNativeScriptRouter,
6
+ runNativeScriptAngularApp,
7
+ } from '@nativescript/angular';
8
+ import { provideExperimentalZonelessChangeDetection } from '@angular/core';
9
+ import { withInterceptorsFromDi } from '@angular/common/http';
10
+ import { routes } from './app/app.routes';
11
+ import { AppComponent } from './app/app.component';
2
12
 
3
- import { AppModule } from './app/app.module';
13
+ /**
14
+ * Disable zone by setting this to true
15
+ * Then also adjust polyfills.ts (see note there)
16
+ */
17
+ const EXPERIMENTAL_ZONELESS = false;
4
18
 
5
19
  runNativeScriptAngularApp({
6
- appModuleBootstrap: () => platformNativeScript().bootstrapModule(AppModule),
20
+ appModuleBootstrap: () => {
21
+ return bootstrapApplication(AppComponent, {
22
+ providers: [
23
+ provideNativeScriptHttpClient(withInterceptorsFromDi()),
24
+ provideNativeScriptRouter(routes),
25
+ EXPERIMENTAL_ZONELESS
26
+ ? provideExperimentalZonelessChangeDetection()
27
+ : provideNativeScriptNgZone(),
28
+ ],
29
+ });
30
+ },
7
31
  });
8
-
package/src/polyfills.ts CHANGED
@@ -7,6 +7,11 @@ import '@nativescript/core/globals';
7
7
  // Install @nativescript/angular specific polyfills
8
8
  import '@nativescript/angular/polyfills';
9
9
 
10
+ /**
11
+ * Disable zone completely by removing the following 3 imports
12
+ * alongside also adjusting main.ts to boot zoneless
13
+ */
14
+
10
15
  /**
11
16
  * Zone.js and patches
12
17
  */
@@ -1,17 +0,0 @@
1
- import { NgModule } from '@angular/core'
2
- import { Routes } from '@angular/router'
3
- import { NativeScriptRouterModule } from '@nativescript/angular'
4
-
5
- const routes: Routes = [
6
- { path: '', redirectTo: '/home', pathMatch: 'full' },
7
- {
8
- path: 'home',
9
- loadChildren: () => import('~/app/home/home.module').then((m) => m.HomeModule),
10
- },
11
- ]
12
-
13
- @NgModule({
14
- imports: [NativeScriptRouterModule.forRoot(routes)],
15
- exports: [NativeScriptRouterModule],
16
- })
17
- export class AppRoutingModule {}
@@ -1,13 +0,0 @@
1
- import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'
2
- import { NativeScriptModule } from '@nativescript/angular'
3
-
4
- import { AppRoutingModule } from './app-routing.module'
5
- import { AppComponent } from './app.component'
6
-
7
- @NgModule({
8
- bootstrap: [AppComponent],
9
- imports: [NativeScriptModule, AppRoutingModule],
10
- declarations: [AppComponent],
11
- schemas: [NO_ERRORS_SCHEMA],
12
- })
13
- export class AppModule {}
@@ -1,13 +0,0 @@
1
- import { NgModule } from '@angular/core'
2
- import { Routes } from '@angular/router'
3
- import { NativeScriptRouterModule } from '@nativescript/angular'
4
-
5
- import { HomeComponent } from './home.component'
6
-
7
- const routes: Routes = [{ path: '', component: HomeComponent }]
8
-
9
- @NgModule({
10
- imports: [NativeScriptRouterModule.forChild(routes)],
11
- exports: [NativeScriptRouterModule],
12
- })
13
- export class HomeRoutingModule {}
@@ -1,12 +0,0 @@
1
- import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'
2
- import { NativeScriptCommonModule } from '@nativescript/angular'
3
-
4
- import { HomeRoutingModule } from './home-routing.module'
5
- import { HomeComponent } from './home.component'
6
-
7
- @NgModule({
8
- imports: [NativeScriptCommonModule, HomeRoutingModule],
9
- declarations: [HomeComponent],
10
- schemas: [NO_ERRORS_SCHEMA],
11
- })
12
- export class HomeModule {}