@nativescript/template-blank-ng 8.8.2 → 8.8.3
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 +15 -15
- package/src/app/app.component.ts +5 -2
- package/src/app/app.routes.ts +6 -0
- package/src/app/home/home.component.html +1 -0
- package/src/app/home/home.component.ts +8 -8
- package/src/main.ts +27 -4
- package/src/polyfills.ts +5 -0
- package/src/app/app-routing.module.ts +0 -17
- package/src/app/app.module.ts +0 -13
- package/src/app/home/home-routing.module.ts +0 -13
- package/src/app/home/home.module.ts +0 -12
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.
|
|
6
|
+
"version": "8.8.3",
|
|
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,26 @@
|
|
|
39
39
|
"url": "https://github.com/NativeScript/NativeScript/issues"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@angular/animations": "~
|
|
43
|
-
"@angular/common": "~
|
|
44
|
-
"@angular/compiler": "~
|
|
45
|
-
"@angular/core": "~
|
|
46
|
-
"@angular/forms": "~
|
|
47
|
-
"@angular/platform-browser": "~
|
|
48
|
-
"@angular/platform-browser-dynamic": "~
|
|
49
|
-
"@angular/router": "~
|
|
50
|
-
"@nativescript/angular": "^
|
|
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
52
|
"@nativescript/theme": "^3.1.0",
|
|
53
53
|
"rxjs": "~7.8.0",
|
|
54
|
-
"zone.js": "~0.
|
|
54
|
+
"zone.js": "~0.15.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@angular-devkit/build-angular": "~
|
|
58
|
-
"@angular/compiler-cli": "~
|
|
57
|
+
"@angular-devkit/build-angular": "~19.0.0",
|
|
58
|
+
"@angular/compiler-cli": "~19.0.0",
|
|
59
59
|
"@nativescript/types": "~8.8.0",
|
|
60
60
|
"@nativescript/webpack": "~5.0.0",
|
|
61
|
-
"@ngtools/webpack": "~
|
|
62
|
-
"typescript": "~5.
|
|
61
|
+
"@ngtools/webpack": "~19.0.0",
|
|
62
|
+
"typescript": "~5.6.0"
|
|
63
63
|
}
|
|
64
64
|
}
|
package/src/app/app.component.ts
CHANGED
|
@@ -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 {}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Component,
|
|
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
|
|
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/main.ts
CHANGED
|
@@ -1,8 +1,31 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
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: () =>
|
|
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 {}
|
package/src/app/app.module.ts
DELETED
|
@@ -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 {}
|