@smapiot/pilet-template-angular 1.0.13-beta.7987 → 1.0.13-beta.7988
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/README.md
CHANGED
|
@@ -32,6 +32,7 @@ For this template we have:
|
|
|
32
32
|
- **src**: Sets the directory of the source files. By default it's `<root>/src`.
|
|
33
33
|
- **standalone**: Sets if the pilet should be considered standalone, i.e., with Angular provided by the pilet. By default, this is derived from inspecting the used Piral instance (if it contains `piral-ng` then `standalone` would be set to `false`)
|
|
34
34
|
- **ngVersion**: Sets the (major) version of Angular to be used in case of a standalone pilet. Otherwise, would be discarded.
|
|
35
|
+
- **ngStandalone**: Sets if the Angular components should be configured as standalone in the `@Component` directive. By default, for Angular 19+ this is set to `true`. Otherwise, it will be set to `false`.
|
|
35
36
|
|
|
36
37
|
## License
|
|
37
38
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smapiot/pilet-template-angular",
|
|
3
|
-
"version": "1.0.13-beta.
|
|
3
|
+
"version": "1.0.13-beta.7988",
|
|
4
4
|
"description": "Official scaffolding template for pilets: 'angular'.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"piral-cli",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@smapiot/template-utils": "1.0.13-beta.
|
|
62
|
+
"@smapiot/template-utils": "1.0.13-beta.7988"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "77d16f20e913e1bff76a052baebb44776e41e07b"
|
|
65
65
|
}
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import 'core-js/proposals/reflect-metadata';
|
|
2
2
|
import { createConverter } from 'piral-ng/standalone';
|
|
3
|
-
import
|
|
3
|
+
import { provideRouter } from '@angular/router';
|
|
4
|
+
import { provideExperimentalZonelessChangeDetection, type ApplicationConfig } from '@angular/core';
|
|
4
5
|
import type { PiletApi } from '<%- sourceName %>';
|
|
5
6
|
<% if (plugins.menu) { -%>
|
|
6
7
|
import { MenuComponent } from './app/menu.component';
|
|
7
8
|
<% } -%>
|
|
8
|
-
|
|
9
9
|
import { PageComponent } from './app/page.component';
|
|
10
10
|
|
|
11
11
|
const appConfig: ApplicationConfig = {
|
|
12
12
|
providers: [
|
|
13
|
+
provideExperimentalZonelessChangeDetection(),
|
|
13
14
|
provideRouter([
|
|
14
15
|
{
|
|
15
16
|
path: "sample",
|
|
16
|
-
component:
|
|
17
|
+
component: PageComponent,
|
|
17
18
|
},
|
|
18
19
|
]),
|
|
19
20
|
],
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
+
<% if (ngStandalone) { -%>
|
|
3
|
+
import { RouterLink } from '@angular/router';
|
|
4
|
+
<% } -%>
|
|
2
5
|
|
|
3
6
|
@Component({
|
|
4
7
|
<% if (ngVersion > 16) { -%>
|
|
5
8
|
standalone: <%= ngStandalone %>,
|
|
9
|
+
<% } -%>
|
|
10
|
+
<% if (ngStandalone) { -%>
|
|
11
|
+
imports: [RouterLink],
|
|
6
12
|
<% } -%>
|
|
7
13
|
styleUrls: [],
|
|
8
14
|
templateUrl: './menu.component.html'
|